@meetkai/mka1 0.54.39 → 0.54.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.
- package/bin/mcp-server.js +25 -9
- package/bin/mcp-server.js.map +27 -27
- package/dist/commonjs/funcs/analyticsCapture.d.ts +3 -0
- package/dist/commonjs/funcs/analyticsCapture.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsCapture.js +3 -0
- package/dist/commonjs/funcs/analyticsCapture.js.map +1 -1
- package/dist/commonjs/funcs/analyticsKeysCreate.d.ts +3 -0
- package/dist/commonjs/funcs/analyticsKeysCreate.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsKeysCreate.js +3 -0
- package/dist/commonjs/funcs/analyticsKeysCreate.js.map +1 -1
- package/dist/commonjs/funcs/analyticsProjectsArchive.d.ts +3 -0
- package/dist/commonjs/funcs/analyticsProjectsArchive.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsProjectsArchive.js +3 -0
- package/dist/commonjs/funcs/analyticsProjectsArchive.js.map +1 -1
- package/dist/commonjs/funcs/analyticsProjectsUpdate.d.ts +3 -0
- package/dist/commonjs/funcs/analyticsProjectsUpdate.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsProjectsUpdate.js +3 -0
- package/dist/commonjs/funcs/analyticsProjectsUpdate.js.map +1 -1
- package/dist/commonjs/funcs/analyticsQuery.d.ts +3 -0
- package/dist/commonjs/funcs/analyticsQuery.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsQuery.js +3 -0
- package/dist/commonjs/funcs/analyticsQuery.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsKeysCreate.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsKeysCreate.js +3 -1
- package/dist/commonjs/mcp-server/tools/analyticsKeysCreate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsProjectsArchive.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsProjectsArchive.js +3 -1
- package/dist/commonjs/mcp-server/tools/analyticsProjectsArchive.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsProjectsUpdate.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsProjectsUpdate.js +3 -1
- package/dist/commonjs/mcp-server/tools/analyticsProjectsUpdate.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsQuery.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsQuery.js +3 -1
- package/dist/commonjs/mcp-server/tools/analyticsQuery.js.map +1 -1
- package/dist/commonjs/models/components/analyticscapturekey.d.ts +3 -0
- package/dist/commonjs/models/components/analyticscapturekey.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticscapturekey.js.map +1 -1
- package/dist/commonjs/models/components/analyticscapturerequest.d.ts +3 -0
- package/dist/commonjs/models/components/analyticscapturerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticscapturerequest.js.map +1 -1
- package/dist/commonjs/models/components/analyticscreatedcapturekey.d.ts +3 -0
- package/dist/commonjs/models/components/analyticscreatedcapturekey.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticscreatedcapturekey.js.map +1 -1
- package/dist/commonjs/models/components/analyticsevent.d.ts +15 -0
- package/dist/commonjs/models/components/analyticsevent.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticsevent.js.map +1 -1
- package/dist/commonjs/models/components/analyticsproject.d.ts +6 -0
- package/dist/commonjs/models/components/analyticsproject.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticsproject.js.map +1 -1
- package/dist/commonjs/models/components/analyticsqueryrequest.d.ts +54 -0
- package/dist/commonjs/models/components/analyticsqueryrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/analyticsqueryrequest.js +9 -0
- package/dist/commonjs/models/components/analyticsqueryrequest.js.map +1 -1
- package/dist/commonjs/models/components/sessionrecord.d.ts +4 -0
- package/dist/commonjs/models/components/sessionrecord.d.ts.map +1 -1
- package/dist/commonjs/models/components/sessionrecord.js +9 -0
- package/dist/commonjs/models/components/sessionrecord.js.map +1 -1
- package/dist/commonjs/models/operations/analyticskeyscreate.d.ts +3 -0
- package/dist/commonjs/models/operations/analyticskeyscreate.d.ts.map +1 -1
- package/dist/commonjs/models/operations/analyticskeyscreate.js.map +1 -1
- package/dist/commonjs/models/operations/analyticskeyslist.d.ts +3 -0
- package/dist/commonjs/models/operations/analyticskeyslist.d.ts.map +1 -1
- package/dist/commonjs/models/operations/analyticskeyslist.js.map +1 -1
- package/dist/commonjs/models/operations/analyticskeysrevoke.d.ts +3 -0
- package/dist/commonjs/models/operations/analyticskeysrevoke.d.ts.map +1 -1
- package/dist/commonjs/models/operations/analyticskeysrevoke.js.map +1 -1
- package/dist/commonjs/models/operations/analyticsprojectsarchive.d.ts +3 -0
- package/dist/commonjs/models/operations/analyticsprojectsarchive.d.ts.map +1 -1
- package/dist/commonjs/models/operations/analyticsprojectsarchive.js.map +1 -1
- package/dist/commonjs/models/operations/analyticsprojectsget.d.ts +3 -0
- package/dist/commonjs/models/operations/analyticsprojectsget.d.ts.map +1 -1
- package/dist/commonjs/models/operations/analyticsprojectsget.js.map +1 -1
- package/dist/commonjs/models/operations/analyticsprojectsupdate.d.ts +3 -0
- package/dist/commonjs/models/operations/analyticsprojectsupdate.d.ts.map +1 -1
- package/dist/commonjs/models/operations/analyticsprojectsupdate.js.map +1 -1
- package/dist/commonjs/models/operations/analyticsquery.d.ts +3 -0
- package/dist/commonjs/models/operations/analyticsquery.d.ts.map +1 -1
- package/dist/commonjs/models/operations/analyticsquery.js.map +1 -1
- package/dist/commonjs/react-query/analyticsCapture.d.ts +3 -0
- package/dist/commonjs/react-query/analyticsCapture.d.ts.map +1 -1
- package/dist/commonjs/react-query/analyticsCapture.js +3 -0
- package/dist/commonjs/react-query/analyticsCapture.js.map +1 -1
- package/dist/commonjs/react-query/analyticsKeysCreate.d.ts +3 -0
- package/dist/commonjs/react-query/analyticsKeysCreate.d.ts.map +1 -1
- package/dist/commonjs/react-query/analyticsKeysCreate.js +3 -0
- package/dist/commonjs/react-query/analyticsKeysCreate.js.map +1 -1
- package/dist/commonjs/react-query/analyticsProjectsArchive.d.ts +3 -0
- package/dist/commonjs/react-query/analyticsProjectsArchive.d.ts.map +1 -1
- package/dist/commonjs/react-query/analyticsProjectsArchive.js +3 -0
- package/dist/commonjs/react-query/analyticsProjectsArchive.js.map +1 -1
- package/dist/commonjs/react-query/analyticsProjectsUpdate.d.ts +3 -0
- package/dist/commonjs/react-query/analyticsProjectsUpdate.d.ts.map +1 -1
- package/dist/commonjs/react-query/analyticsProjectsUpdate.js +3 -0
- package/dist/commonjs/react-query/analyticsProjectsUpdate.js.map +1 -1
- package/dist/commonjs/react-query/analyticsQuery.d.ts +3 -0
- package/dist/commonjs/react-query/analyticsQuery.d.ts.map +1 -1
- package/dist/commonjs/react-query/analyticsQuery.js +3 -0
- package/dist/commonjs/react-query/analyticsQuery.js.map +1 -1
- package/dist/commonjs/sdk/analytics.d.ts +6 -0
- package/dist/commonjs/sdk/analytics.d.ts.map +1 -1
- package/dist/commonjs/sdk/analytics.js +6 -0
- package/dist/commonjs/sdk/analytics.js.map +1 -1
- package/dist/commonjs/sdk/keys.d.ts +3 -0
- package/dist/commonjs/sdk/keys.d.ts.map +1 -1
- package/dist/commonjs/sdk/keys.js +3 -0
- package/dist/commonjs/sdk/keys.js.map +1 -1
- package/dist/commonjs/sdk/projects.d.ts +6 -0
- package/dist/commonjs/sdk/projects.d.ts.map +1 -1
- package/dist/commonjs/sdk/projects.js +6 -0
- package/dist/commonjs/sdk/projects.js.map +1 -1
- package/dist/esm/funcs/analyticsCapture.d.ts +3 -0
- package/dist/esm/funcs/analyticsCapture.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsCapture.js +3 -0
- package/dist/esm/funcs/analyticsCapture.js.map +1 -1
- package/dist/esm/funcs/analyticsKeysCreate.d.ts +3 -0
- package/dist/esm/funcs/analyticsKeysCreate.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsKeysCreate.js +3 -0
- package/dist/esm/funcs/analyticsKeysCreate.js.map +1 -1
- package/dist/esm/funcs/analyticsProjectsArchive.d.ts +3 -0
- package/dist/esm/funcs/analyticsProjectsArchive.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsProjectsArchive.js +3 -0
- package/dist/esm/funcs/analyticsProjectsArchive.js.map +1 -1
- package/dist/esm/funcs/analyticsProjectsUpdate.d.ts +3 -0
- package/dist/esm/funcs/analyticsProjectsUpdate.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsProjectsUpdate.js +3 -0
- package/dist/esm/funcs/analyticsProjectsUpdate.js.map +1 -1
- package/dist/esm/funcs/analyticsQuery.d.ts +3 -0
- package/dist/esm/funcs/analyticsQuery.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsQuery.js +3 -0
- package/dist/esm/funcs/analyticsQuery.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/analyticsKeysCreate.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsKeysCreate.js +3 -1
- package/dist/esm/mcp-server/tools/analyticsKeysCreate.js.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsProjectsArchive.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsProjectsArchive.js +3 -1
- package/dist/esm/mcp-server/tools/analyticsProjectsArchive.js.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsProjectsUpdate.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsProjectsUpdate.js +3 -1
- package/dist/esm/mcp-server/tools/analyticsProjectsUpdate.js.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsQuery.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsQuery.js +3 -1
- package/dist/esm/mcp-server/tools/analyticsQuery.js.map +1 -1
- package/dist/esm/models/components/analyticscapturekey.d.ts +3 -0
- package/dist/esm/models/components/analyticscapturekey.d.ts.map +1 -1
- package/dist/esm/models/components/analyticscapturekey.js.map +1 -1
- package/dist/esm/models/components/analyticscapturerequest.d.ts +3 -0
- package/dist/esm/models/components/analyticscapturerequest.d.ts.map +1 -1
- package/dist/esm/models/components/analyticscapturerequest.js.map +1 -1
- package/dist/esm/models/components/analyticscreatedcapturekey.d.ts +3 -0
- package/dist/esm/models/components/analyticscreatedcapturekey.d.ts.map +1 -1
- package/dist/esm/models/components/analyticscreatedcapturekey.js.map +1 -1
- package/dist/esm/models/components/analyticsevent.d.ts +15 -0
- package/dist/esm/models/components/analyticsevent.d.ts.map +1 -1
- package/dist/esm/models/components/analyticsevent.js.map +1 -1
- package/dist/esm/models/components/analyticsproject.d.ts +6 -0
- package/dist/esm/models/components/analyticsproject.d.ts.map +1 -1
- package/dist/esm/models/components/analyticsproject.js.map +1 -1
- package/dist/esm/models/components/analyticsqueryrequest.d.ts +54 -0
- package/dist/esm/models/components/analyticsqueryrequest.d.ts.map +1 -1
- package/dist/esm/models/components/analyticsqueryrequest.js +9 -0
- package/dist/esm/models/components/analyticsqueryrequest.js.map +1 -1
- package/dist/esm/models/components/sessionrecord.d.ts +4 -0
- package/dist/esm/models/components/sessionrecord.d.ts.map +1 -1
- package/dist/esm/models/components/sessionrecord.js +9 -0
- package/dist/esm/models/components/sessionrecord.js.map +1 -1
- package/dist/esm/models/operations/analyticskeyscreate.d.ts +3 -0
- package/dist/esm/models/operations/analyticskeyscreate.d.ts.map +1 -1
- package/dist/esm/models/operations/analyticskeyscreate.js.map +1 -1
- package/dist/esm/models/operations/analyticskeyslist.d.ts +3 -0
- package/dist/esm/models/operations/analyticskeyslist.d.ts.map +1 -1
- package/dist/esm/models/operations/analyticskeyslist.js.map +1 -1
- package/dist/esm/models/operations/analyticskeysrevoke.d.ts +3 -0
- package/dist/esm/models/operations/analyticskeysrevoke.d.ts.map +1 -1
- package/dist/esm/models/operations/analyticskeysrevoke.js.map +1 -1
- package/dist/esm/models/operations/analyticsprojectsarchive.d.ts +3 -0
- package/dist/esm/models/operations/analyticsprojectsarchive.d.ts.map +1 -1
- package/dist/esm/models/operations/analyticsprojectsarchive.js.map +1 -1
- package/dist/esm/models/operations/analyticsprojectsget.d.ts +3 -0
- package/dist/esm/models/operations/analyticsprojectsget.d.ts.map +1 -1
- package/dist/esm/models/operations/analyticsprojectsget.js.map +1 -1
- package/dist/esm/models/operations/analyticsprojectsupdate.d.ts +3 -0
- package/dist/esm/models/operations/analyticsprojectsupdate.d.ts.map +1 -1
- package/dist/esm/models/operations/analyticsprojectsupdate.js.map +1 -1
- package/dist/esm/models/operations/analyticsquery.d.ts +3 -0
- package/dist/esm/models/operations/analyticsquery.d.ts.map +1 -1
- package/dist/esm/models/operations/analyticsquery.js.map +1 -1
- package/dist/esm/react-query/analyticsCapture.d.ts +3 -0
- package/dist/esm/react-query/analyticsCapture.d.ts.map +1 -1
- package/dist/esm/react-query/analyticsCapture.js +3 -0
- package/dist/esm/react-query/analyticsCapture.js.map +1 -1
- package/dist/esm/react-query/analyticsKeysCreate.d.ts +3 -0
- package/dist/esm/react-query/analyticsKeysCreate.d.ts.map +1 -1
- package/dist/esm/react-query/analyticsKeysCreate.js +3 -0
- package/dist/esm/react-query/analyticsKeysCreate.js.map +1 -1
- package/dist/esm/react-query/analyticsProjectsArchive.d.ts +3 -0
- package/dist/esm/react-query/analyticsProjectsArchive.d.ts.map +1 -1
- package/dist/esm/react-query/analyticsProjectsArchive.js +3 -0
- package/dist/esm/react-query/analyticsProjectsArchive.js.map +1 -1
- package/dist/esm/react-query/analyticsProjectsUpdate.d.ts +3 -0
- package/dist/esm/react-query/analyticsProjectsUpdate.d.ts.map +1 -1
- package/dist/esm/react-query/analyticsProjectsUpdate.js +3 -0
- package/dist/esm/react-query/analyticsProjectsUpdate.js.map +1 -1
- package/dist/esm/react-query/analyticsQuery.d.ts +3 -0
- package/dist/esm/react-query/analyticsQuery.d.ts.map +1 -1
- package/dist/esm/react-query/analyticsQuery.js +3 -0
- package/dist/esm/react-query/analyticsQuery.js.map +1 -1
- package/dist/esm/sdk/analytics.d.ts +6 -0
- package/dist/esm/sdk/analytics.d.ts.map +1 -1
- package/dist/esm/sdk/analytics.js +6 -0
- package/dist/esm/sdk/analytics.js.map +1 -1
- package/dist/esm/sdk/keys.d.ts +3 -0
- package/dist/esm/sdk/keys.d.ts.map +1 -1
- package/dist/esm/sdk/keys.js +3 -0
- package/dist/esm/sdk/keys.js.map +1 -1
- package/dist/esm/sdk/projects.d.ts +6 -0
- package/dist/esm/sdk/projects.d.ts.map +1 -1
- package/dist/esm/sdk/projects.js +6 -0
- package/dist/esm/sdk/projects.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analyticsCapture.ts +3 -0
- package/src/funcs/analyticsKeysCreate.ts +3 -0
- package/src/funcs/analyticsProjectsArchive.ts +3 -0
- package/src/funcs/analyticsProjectsUpdate.ts +3 -0
- package/src/funcs/analyticsQuery.ts +3 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/analyticsKeysCreate.ts +3 -1
- package/src/mcp-server/tools/analyticsProjectsArchive.ts +3 -1
- package/src/mcp-server/tools/analyticsProjectsUpdate.ts +3 -1
- package/src/mcp-server/tools/analyticsQuery.ts +3 -1
- package/src/models/components/analyticscapturekey.ts +3 -0
- package/src/models/components/analyticscapturerequest.ts +3 -0
- package/src/models/components/analyticscreatedcapturekey.ts +3 -0
- package/src/models/components/analyticsevent.ts +15 -0
- package/src/models/components/analyticsproject.ts +6 -0
- package/src/models/components/analyticsqueryrequest.ts +54 -0
- package/src/models/components/sessionrecord.ts +15 -0
- package/src/models/operations/analyticskeyscreate.ts +3 -0
- package/src/models/operations/analyticskeyslist.ts +3 -0
- package/src/models/operations/analyticskeysrevoke.ts +3 -0
- package/src/models/operations/analyticsprojectsarchive.ts +3 -0
- package/src/models/operations/analyticsprojectsget.ts +3 -0
- package/src/models/operations/analyticsprojectsupdate.ts +3 -0
- package/src/models/operations/analyticsquery.ts +3 -0
- package/src/react-query/analyticsCapture.ts +3 -0
- package/src/react-query/analyticsKeysCreate.ts +3 -0
- package/src/react-query/analyticsProjectsArchive.ts +3 -0
- package/src/react-query/analyticsProjectsUpdate.ts +3 -0
- package/src/react-query/analyticsQuery.ts +3 -0
- package/src/sdk/analytics.ts +6 -0
- package/src/sdk/keys.ts +3 -0
- package/src/sdk/projects.ts +6 -0
package/src/mcp-server/server.ts
CHANGED
|
@@ -12,7 +12,9 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$analyticsKeysCreate: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "analytics-keys-create",
|
|
15
|
-
description: `Create a capture key and return its secret once
|
|
15
|
+
description: `Create a capture key and return its secret once
|
|
16
|
+
|
|
17
|
+
Create a key that can send events to this project. Save the key from this response; its secret is only returned once. Capture keys cannot read analytics or manage projects.`,
|
|
16
18
|
args,
|
|
17
19
|
tool: async (client, args, ctx) => {
|
|
18
20
|
const [result, apiCall] = await analyticsKeysCreate(
|
|
@@ -12,7 +12,9 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$analyticsProjectsArchive: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "analytics-projects-archive",
|
|
15
|
-
description: `Archive an analytics project
|
|
15
|
+
description: `Archive an analytics project
|
|
16
|
+
|
|
17
|
+
Stop new captures and queries for this project. Previously accepted events continue processing. Archiving does not delete stored events.`,
|
|
16
18
|
args,
|
|
17
19
|
tool: async (client, args, ctx) => {
|
|
18
20
|
const [result, apiCall] = await analyticsProjectsArchive(
|
|
@@ -12,7 +12,9 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$analyticsProjectsUpdate: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "analytics-projects-update",
|
|
15
|
-
description: `Rename an active analytics project
|
|
15
|
+
description: `Rename an active analytics project
|
|
16
|
+
|
|
17
|
+
Rename an active project. Project ownership cannot be changed.`,
|
|
16
18
|
args,
|
|
17
19
|
tool: async (client, args, ctx) => {
|
|
18
20
|
const [result, apiCall] = await analyticsProjectsUpdate(
|
|
@@ -12,7 +12,9 @@ const args = {
|
|
|
12
12
|
|
|
13
13
|
export const tool$analyticsQuery: ToolDefinition<typeof args> = {
|
|
14
14
|
name: "analytics-query",
|
|
15
|
-
description: `Query event counts or unique visitors
|
|
15
|
+
description: `Query event counts or unique visitors
|
|
16
|
+
|
|
17
|
+
Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into UTC time buckets. The range includes from and excludes to. Duplicate event IDs are counted once.`,
|
|
16
18
|
args,
|
|
17
19
|
tool: async (client, args, ctx) => {
|
|
18
20
|
const [result, apiCall] = await analyticsQuery(
|
|
@@ -15,6 +15,9 @@ import {
|
|
|
15
15
|
} from "./analyticsevent.js";
|
|
16
16
|
|
|
17
17
|
export type AnalyticsCaptureRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier for this batch. Reuse it with the same events when retrying. Reusing it with different events returns 409.
|
|
20
|
+
*/
|
|
18
21
|
idempotencyKey: string;
|
|
19
22
|
events: Array<AnalyticsEvent>;
|
|
20
23
|
};
|
|
@@ -11,10 +11,25 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
export type Properties = string | number | boolean;
|
|
12
12
|
|
|
13
13
|
export type AnalyticsEvent = {
|
|
14
|
+
/**
|
|
15
|
+
* Unique ID for this event. Reuse it when retrying the same event.
|
|
16
|
+
*/
|
|
14
17
|
eventId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Name of the action you are tracking.
|
|
20
|
+
*/
|
|
15
21
|
eventName: string;
|
|
22
|
+
/**
|
|
23
|
+
* When the event occurred. Use an ISO 8601 timestamp with Z for UTC or an offset such as -07:00. Send current timestamps for new events.
|
|
24
|
+
*/
|
|
16
25
|
timestamp: Date;
|
|
26
|
+
/**
|
|
27
|
+
* Your identifier for the visitor. Unique visitor queries count distinct values of this field.
|
|
28
|
+
*/
|
|
17
29
|
distinctId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Up to 100 event properties. Values can be strings, numbers, booleans, or null. Nested objects and arrays are not supported.
|
|
32
|
+
*/
|
|
18
33
|
properties: { [k: string]: string | number | boolean | null };
|
|
19
34
|
};
|
|
20
35
|
|
|
@@ -13,7 +13,13 @@ export type AnalyticsProject = {
|
|
|
13
13
|
orgId: string;
|
|
14
14
|
teamId: string | null;
|
|
15
15
|
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* When the project was created, in UTC.
|
|
18
|
+
*/
|
|
16
19
|
createdAt: Date;
|
|
20
|
+
/**
|
|
21
|
+
* When the project was last updated, in UTC.
|
|
22
|
+
*/
|
|
17
23
|
updatedAt: Date;
|
|
18
24
|
archivedAt: Date | null;
|
|
19
25
|
};
|
|
@@ -9,21 +9,36 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* count counts events. unique_visitors counts distinct values of distinct_id. Both deduplicate event IDs first.
|
|
14
|
+
*/
|
|
12
15
|
export const AnalyticsQueryRequestMetric = {
|
|
13
16
|
Count: "count",
|
|
14
17
|
UniqueVisitors: "unique_visitors",
|
|
15
18
|
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* count counts events. unique_visitors counts distinct values of distinct_id. Both deduplicate event IDs first.
|
|
21
|
+
*/
|
|
16
22
|
export type AnalyticsQueryRequestMetric = ClosedEnum<
|
|
17
23
|
typeof AnalyticsQueryRequestMetric
|
|
18
24
|
>;
|
|
19
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Split results into UTC time buckets. Weeks start on Monday. Empty buckets are omitted.
|
|
28
|
+
*/
|
|
20
29
|
export const Bucket = {
|
|
21
30
|
Hour: "hour",
|
|
22
31
|
Day: "day",
|
|
23
32
|
Week: "week",
|
|
24
33
|
} as const;
|
|
34
|
+
/**
|
|
35
|
+
* Split results into UTC time buckets. Weeks start on Monday. Empty buckets are omitted.
|
|
36
|
+
*/
|
|
25
37
|
export type Bucket = ClosedEnum<typeof Bucket>;
|
|
26
38
|
|
|
39
|
+
/**
|
|
40
|
+
* Comparison operator. gt, gte, lt, and lte require a numeric value. exists and not_exists check whether the property is present and do not take a value.
|
|
41
|
+
*/
|
|
27
42
|
export const Op = {
|
|
28
43
|
Eq: "eq",
|
|
29
44
|
Neq: "neq",
|
|
@@ -34,24 +49,63 @@ export const Op = {
|
|
|
34
49
|
Exists: "exists",
|
|
35
50
|
NotExists: "not_exists",
|
|
36
51
|
} as const;
|
|
52
|
+
/**
|
|
53
|
+
* Comparison operator. gt, gte, lt, and lte require a numeric value. exists and not_exists check whether the property is present and do not take a value.
|
|
54
|
+
*/
|
|
37
55
|
export type Op = ClosedEnum<typeof Op>;
|
|
38
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Value to compare. The number 1 differs from the string '1'. Omit for exists and not_exists.
|
|
59
|
+
*/
|
|
39
60
|
export type AnalyticsQueryRequestValue = string | number | boolean;
|
|
40
61
|
|
|
41
62
|
export type AnalyticsQueryRequestFilters = {
|
|
63
|
+
/**
|
|
64
|
+
* Event property to filter. Property names are literal keys, not nested paths.
|
|
65
|
+
*/
|
|
42
66
|
property: string;
|
|
67
|
+
/**
|
|
68
|
+
* Comparison operator. gt, gte, lt, and lte require a numeric value. exists and not_exists check whether the property is present and do not take a value.
|
|
69
|
+
*/
|
|
43
70
|
op: Op;
|
|
71
|
+
/**
|
|
72
|
+
* Value to compare. The number 1 differs from the string '1'. Omit for exists and not_exists.
|
|
73
|
+
*/
|
|
44
74
|
value?: string | number | boolean | null | undefined;
|
|
45
75
|
};
|
|
46
76
|
|
|
47
77
|
export type AnalyticsQueryRequest = {
|
|
78
|
+
/**
|
|
79
|
+
* count counts events. unique_visitors counts distinct values of distinct_id. Both deduplicate event IDs first.
|
|
80
|
+
*/
|
|
48
81
|
metric: AnalyticsQueryRequestMetric;
|
|
82
|
+
/**
|
|
83
|
+
* Start of the time range, inclusive. Use an ISO 8601 timestamp with Z for UTC or an offset such as -07:00. Must be before to.
|
|
84
|
+
*/
|
|
49
85
|
from: Date;
|
|
86
|
+
/**
|
|
87
|
+
* End of the time range, exclusive. Use an ISO 8601 timestamp with Z for UTC or an offset such as -07:00. Must be after from.
|
|
88
|
+
*/
|
|
50
89
|
to: Date;
|
|
90
|
+
/**
|
|
91
|
+
* Only include events with this exact name. Omit to include all event names.
|
|
92
|
+
*/
|
|
51
93
|
eventName?: string | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Split results into UTC time buckets. Weeks start on Monday. Empty buckets are omitted.
|
|
96
|
+
*/
|
|
52
97
|
bucket?: Bucket | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* Group results by one event property. Missing values and null share a group.
|
|
100
|
+
*/
|
|
53
101
|
groupBy?: string | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* Property filters combined with AND. An event must match every filter.
|
|
104
|
+
*/
|
|
54
105
|
filters?: Array<AnalyticsQueryRequestFilters> | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Maximum number of result rows, including rows created by time buckets and property groups.
|
|
108
|
+
*/
|
|
55
109
|
limit?: number | undefined;
|
|
56
110
|
};
|
|
57
111
|
|
|
@@ -70,6 +70,8 @@ export type SessionRecord = {
|
|
|
70
70
|
idleExpiresAt?: Date | null | undefined;
|
|
71
71
|
absoluteExpiresAt?: Date | null | undefined;
|
|
72
72
|
stopReason?: CodingHarnessStopReason | null | undefined;
|
|
73
|
+
runnerCleanupHoldReason?: string | null | undefined;
|
|
74
|
+
runnerCleanupHeldAt?: Date | null | undefined;
|
|
73
75
|
lastCheckpointAt?: Date | null | undefined;
|
|
74
76
|
lastCheckpointGeneration?: number | null | undefined;
|
|
75
77
|
sandboxFeatures?: Array<SandboxFeature> | undefined;
|
|
@@ -115,6 +117,10 @@ export const SessionRecord$inboundSchema: z.ZodType<
|
|
|
115
117
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
116
118
|
).optional(),
|
|
117
119
|
stop_reason: z.nullable(CodingHarnessStopReason$inboundSchema).optional(),
|
|
120
|
+
runner_cleanup_hold_reason: z.nullable(z.string()).optional(),
|
|
121
|
+
runner_cleanup_held_at: z.nullable(
|
|
122
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
123
|
+
).optional(),
|
|
118
124
|
last_checkpoint_at: z.nullable(
|
|
119
125
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
120
126
|
).optional(),
|
|
@@ -149,6 +155,8 @@ export const SessionRecord$inboundSchema: z.ZodType<
|
|
|
149
155
|
"idle_expires_at": "idleExpiresAt",
|
|
150
156
|
"absolute_expires_at": "absoluteExpiresAt",
|
|
151
157
|
"stop_reason": "stopReason",
|
|
158
|
+
"runner_cleanup_hold_reason": "runnerCleanupHoldReason",
|
|
159
|
+
"runner_cleanup_held_at": "runnerCleanupHeldAt",
|
|
152
160
|
"last_checkpoint_at": "lastCheckpointAt",
|
|
153
161
|
"last_checkpoint_generation": "lastCheckpointGeneration",
|
|
154
162
|
"sandbox_features": "sandboxFeatures",
|
|
@@ -181,6 +189,8 @@ export type SessionRecord$Outbound = {
|
|
|
181
189
|
idle_expires_at?: string | null | undefined;
|
|
182
190
|
absolute_expires_at?: string | null | undefined;
|
|
183
191
|
stop_reason?: string | null | undefined;
|
|
192
|
+
runner_cleanup_hold_reason?: string | null | undefined;
|
|
193
|
+
runner_cleanup_held_at?: string | null | undefined;
|
|
184
194
|
last_checkpoint_at?: string | null | undefined;
|
|
185
195
|
last_checkpoint_generation?: number | null | undefined;
|
|
186
196
|
sandbox_features?: Array<string> | undefined;
|
|
@@ -222,6 +232,9 @@ export const SessionRecord$outboundSchema: z.ZodType<
|
|
|
222
232
|
absoluteExpiresAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
223
233
|
.optional(),
|
|
224
234
|
stopReason: z.nullable(CodingHarnessStopReason$outboundSchema).optional(),
|
|
235
|
+
runnerCleanupHoldReason: z.nullable(z.string()).optional(),
|
|
236
|
+
runnerCleanupHeldAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
237
|
+
.optional(),
|
|
225
238
|
lastCheckpointAt: z.nullable(z.date().transform(v => v.toISOString()))
|
|
226
239
|
.optional(),
|
|
227
240
|
lastCheckpointGeneration: z.nullable(z.number().int()).optional(),
|
|
@@ -253,6 +266,8 @@ export const SessionRecord$outboundSchema: z.ZodType<
|
|
|
253
266
|
idleExpiresAt: "idle_expires_at",
|
|
254
267
|
absoluteExpiresAt: "absolute_expires_at",
|
|
255
268
|
stopReason: "stop_reason",
|
|
269
|
+
runnerCleanupHoldReason: "runner_cleanup_hold_reason",
|
|
270
|
+
runnerCleanupHeldAt: "runner_cleanup_held_at",
|
|
256
271
|
lastCheckpointAt: "last_checkpoint_at",
|
|
257
272
|
lastCheckpointGeneration: "last_checkpoint_generation",
|
|
258
273
|
sandboxFeatures: "sandbox_features",
|
|
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type AnalyticsKeysCreateRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the analytics project.
|
|
15
|
+
*/
|
|
13
16
|
id: string;
|
|
14
17
|
analyticsKeyCreate: components.AnalyticsKeyCreate;
|
|
15
18
|
};
|
|
@@ -8,6 +8,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type AnalyticsKeysListRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* ID of the analytics project.
|
|
13
|
+
*/
|
|
11
14
|
id: string;
|
|
12
15
|
limit?: number | undefined;
|
|
13
16
|
after?: string | undefined;
|
|
@@ -8,6 +8,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
10
|
export type AnalyticsKeysRevokeRequest = {
|
|
11
|
+
/**
|
|
12
|
+
* ID of the analytics project.
|
|
13
|
+
*/
|
|
11
14
|
id: string;
|
|
12
15
|
keyId: string;
|
|
13
16
|
};
|
|
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type AnalyticsProjectsUpdateRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the analytics project.
|
|
15
|
+
*/
|
|
13
16
|
id: string;
|
|
14
17
|
analyticsProjectUpdate: components.AnalyticsProjectUpdate;
|
|
15
18
|
};
|
|
@@ -10,6 +10,9 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type AnalyticsQueryRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the analytics project.
|
|
15
|
+
*/
|
|
13
16
|
id: string;
|
|
14
17
|
analyticsQueryRequest: components.AnalyticsQueryRequest;
|
|
15
18
|
};
|
|
@@ -49,6 +49,9 @@ export type AnalyticsCaptureMutationError =
|
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Durably accept a batch of events
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Send a batch of events using the project's X-Analytics-Key header. A 202 response confirms the batch is stored; events become available to queries after background processing. Retry with the same idempotency_key and unchanged events if you do not receive a response.
|
|
52
55
|
*/
|
|
53
56
|
export function useAnalyticsCaptureMutation(
|
|
54
57
|
options?: MutationHookOptions<
|
|
@@ -49,6 +49,9 @@ export type AnalyticsKeysCreateMutationError =
|
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* Create a capture key and return its secret once
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* Create a key that can send events to this project. Save the key from this response; its secret is only returned once. Capture keys cannot read analytics or manage projects.
|
|
52
55
|
*/
|
|
53
56
|
export function useAnalyticsKeysCreateMutation(
|
|
54
57
|
options?: MutationHookOptions<
|
|
@@ -48,6 +48,9 @@ export type AnalyticsProjectsArchiveMutationError =
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Archive an analytics project
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Stop new captures and queries for this project. Previously accepted events continue processing. Archiving does not delete stored events.
|
|
51
54
|
*/
|
|
52
55
|
export function useAnalyticsProjectsArchiveMutation(
|
|
53
56
|
options?: MutationHookOptions<
|
|
@@ -48,6 +48,9 @@ export type AnalyticsProjectsUpdateMutationError =
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Rename an active analytics project
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Rename an active project. Project ownership cannot be changed.
|
|
51
54
|
*/
|
|
52
55
|
export function useAnalyticsProjectsUpdateMutation(
|
|
53
56
|
options?: MutationHookOptions<
|
|
@@ -48,6 +48,9 @@ export type AnalyticsQueryMutationError =
|
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Query event counts or unique visitors
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into UTC time buckets. The range includes from and excludes to. Duplicate event IDs are counted once.
|
|
51
54
|
*/
|
|
52
55
|
export function useAnalyticsQueryMutation(
|
|
53
56
|
options?: MutationHookOptions<
|
package/src/sdk/analytics.ts
CHANGED
|
@@ -24,6 +24,9 @@ export class Analytics extends ClientSDK {
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Durably accept a batch of events
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Send a batch of events using the project's X-Analytics-Key header. A 202 response confirms the batch is stored; events become available to queries after background processing. Retry with the same idempotency_key and unchanged events if you do not receive a response.
|
|
27
30
|
*/
|
|
28
31
|
async capture(
|
|
29
32
|
security: operations.AnalyticsCaptureSecurity,
|
|
@@ -40,6 +43,9 @@ export class Analytics extends ClientSDK {
|
|
|
40
43
|
|
|
41
44
|
/**
|
|
42
45
|
* Query event counts or unique visitors
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* Count events or unique visitors in a time range. Optionally filter by event name or properties, group by one property, and split results into UTC time buckets. The range includes from and excludes to. Duplicate event IDs are counted once.
|
|
43
49
|
*/
|
|
44
50
|
async query(
|
|
45
51
|
request: operations.AnalyticsQueryRequest,
|
package/src/sdk/keys.ts
CHANGED
|
@@ -13,6 +13,9 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
13
13
|
export class Keys extends ClientSDK {
|
|
14
14
|
/**
|
|
15
15
|
* Create a capture key and return its secret once
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Create a key that can send events to this project. Save the key from this response; its secret is only returned once. Capture keys cannot read analytics or manage projects.
|
|
16
19
|
*/
|
|
17
20
|
async create(
|
|
18
21
|
request: operations.AnalyticsKeysCreateRequest,
|
package/src/sdk/projects.ts
CHANGED
|
@@ -57,6 +57,9 @@ export class Projects extends ClientSDK {
|
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* Rename an active analytics project
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Rename an active project. Project ownership cannot be changed.
|
|
60
63
|
*/
|
|
61
64
|
async update(
|
|
62
65
|
request: operations.AnalyticsProjectsUpdateRequest,
|
|
@@ -71,6 +74,9 @@ export class Projects extends ClientSDK {
|
|
|
71
74
|
|
|
72
75
|
/**
|
|
73
76
|
* Archive an analytics project
|
|
77
|
+
*
|
|
78
|
+
* @remarks
|
|
79
|
+
* Stop new captures and queries for this project. Previously accepted events continue processing. Archiving does not delete stored events.
|
|
74
80
|
*/
|
|
75
81
|
async archive(
|
|
76
82
|
request: operations.AnalyticsProjectsArchiveRequest,
|