@meetkai/mka1 0.54.45 → 0.54.46
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/README.md +315 -303
- package/bin/mcp-server.js +3125 -2627
- package/bin/mcp-server.js.map +20 -9
- package/dist/commonjs/funcs/analyticsEventsSearch.d.ts +21 -0
- package/dist/commonjs/funcs/analyticsEventsSearch.d.ts.map +1 -0
- package/dist/commonjs/funcs/analyticsEventsSearch.js +140 -0
- package/dist/commonjs/funcs/analyticsEventsSearch.js.map +1 -0
- package/dist/commonjs/funcs/analyticsVisitorsSearch.d.ts +21 -0
- package/dist/commonjs/funcs/analyticsVisitorsSearch.d.ts.map +1 -0
- package/dist/commonjs/funcs/analyticsVisitorsSearch.js +140 -0
- package/dist/commonjs/funcs/analyticsVisitorsSearch.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/analyticsEventsSearch.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/analyticsEventsSearch.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/analyticsEventsSearch.js +64 -0
- package/dist/commonjs/mcp-server/tools/analyticsEventsSearch.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/analyticsVisitorsSearch.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/analyticsVisitorsSearch.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/analyticsVisitorsSearch.js +64 -0
- package/dist/commonjs/mcp-server/tools/analyticsVisitorsSearch.js.map +1 -0
- package/dist/commonjs/models/components/analyticsevent.d.ts +2 -2
- package/dist/commonjs/models/components/analyticseventsearchrequest.d.ts +110 -0
- package/dist/commonjs/models/components/analyticseventsearchrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/analyticseventsearchrequest.js +130 -0
- package/dist/commonjs/models/components/analyticseventsearchrequest.js.map +1 -0
- package/dist/commonjs/models/components/analyticseventsearchresponse.d.ts +26 -0
- package/dist/commonjs/models/components/analyticseventsearchresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/analyticseventsearchresponse.js +70 -0
- package/dist/commonjs/models/components/analyticseventsearchresponse.js.map +1 -0
- package/dist/commonjs/models/components/analyticsvisitor.d.ts +35 -0
- package/dist/commonjs/models/components/analyticsvisitor.d.ts.map +1 -0
- package/dist/commonjs/models/components/analyticsvisitor.js +79 -0
- package/dist/commonjs/models/components/analyticsvisitor.js.map +1 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchrequest.d.ts +105 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchrequest.js +126 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchrequest.js.map +1 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchresponse.d.ts +26 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchresponse.js +70 -0
- package/dist/commonjs/models/components/analyticsvisitorsearchresponse.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +5 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +5 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/operations/analyticseventssearch.d.ts +23 -0
- package/dist/commonjs/models/operations/analyticseventssearch.d.ts.map +1 -0
- package/dist/commonjs/models/operations/analyticseventssearch.js +70 -0
- package/dist/commonjs/models/operations/analyticseventssearch.js.map +1 -0
- package/dist/commonjs/models/operations/analyticsvisitorssearch.d.ts +23 -0
- package/dist/commonjs/models/operations/analyticsvisitorssearch.d.ts.map +1 -0
- package/dist/commonjs/models/operations/analyticsvisitorssearch.js +70 -0
- package/dist/commonjs/models/operations/analyticsvisitorssearch.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/react-query/analyticsEventsSearch.d.ts +30 -0
- package/dist/commonjs/react-query/analyticsEventsSearch.d.ts.map +1 -0
- package/dist/commonjs/react-query/analyticsEventsSearch.js +47 -0
- package/dist/commonjs/react-query/analyticsEventsSearch.js.map +1 -0
- package/dist/commonjs/react-query/analyticsVisitorsSearch.d.ts +30 -0
- package/dist/commonjs/react-query/analyticsVisitorsSearch.d.ts.map +1 -0
- package/dist/commonjs/react-query/analyticsVisitorsSearch.js +47 -0
- package/dist/commonjs/react-query/analyticsVisitorsSearch.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.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 +8 -0
- package/dist/commonjs/sdk/analytics.js.map +1 -1
- package/dist/commonjs/sdk/events.d.ts +13 -0
- package/dist/commonjs/sdk/events.d.ts.map +1 -0
- package/dist/commonjs/sdk/events.js +22 -0
- package/dist/commonjs/sdk/events.js.map +1 -0
- package/dist/commonjs/sdk/visitors.d.ts +13 -0
- package/dist/commonjs/sdk/visitors.d.ts.map +1 -0
- package/dist/commonjs/sdk/visitors.js +22 -0
- package/dist/commonjs/sdk/visitors.js.map +1 -0
- package/dist/esm/funcs/analyticsEventsSearch.d.ts +21 -0
- package/dist/esm/funcs/analyticsEventsSearch.d.ts.map +1 -0
- package/dist/esm/funcs/analyticsEventsSearch.js +104 -0
- package/dist/esm/funcs/analyticsEventsSearch.js.map +1 -0
- package/dist/esm/funcs/analyticsVisitorsSearch.d.ts +21 -0
- package/dist/esm/funcs/analyticsVisitorsSearch.d.ts.map +1 -0
- package/dist/esm/funcs/analyticsVisitorsSearch.js +104 -0
- package/dist/esm/funcs/analyticsVisitorsSearch.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/analyticsEventsSearch.d.ts +8 -0
- package/dist/esm/mcp-server/tools/analyticsEventsSearch.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/analyticsEventsSearch.js +28 -0
- package/dist/esm/mcp-server/tools/analyticsEventsSearch.js.map +1 -0
- package/dist/esm/mcp-server/tools/analyticsVisitorsSearch.d.ts +8 -0
- package/dist/esm/mcp-server/tools/analyticsVisitorsSearch.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/analyticsVisitorsSearch.js +28 -0
- package/dist/esm/mcp-server/tools/analyticsVisitorsSearch.js.map +1 -0
- package/dist/esm/models/components/analyticsevent.d.ts +2 -2
- package/dist/esm/models/components/analyticseventsearchrequest.d.ts +110 -0
- package/dist/esm/models/components/analyticseventsearchrequest.d.ts.map +1 -0
- package/dist/esm/models/components/analyticseventsearchrequest.js +88 -0
- package/dist/esm/models/components/analyticseventsearchrequest.js.map +1 -0
- package/dist/esm/models/components/analyticseventsearchresponse.d.ts +26 -0
- package/dist/esm/models/components/analyticseventsearchresponse.d.ts.map +1 -0
- package/dist/esm/models/components/analyticseventsearchresponse.js +32 -0
- package/dist/esm/models/components/analyticseventsearchresponse.js.map +1 -0
- package/dist/esm/models/components/analyticsvisitor.d.ts +35 -0
- package/dist/esm/models/components/analyticsvisitor.d.ts.map +1 -0
- package/dist/esm/models/components/analyticsvisitor.js +41 -0
- package/dist/esm/models/components/analyticsvisitor.js.map +1 -0
- package/dist/esm/models/components/analyticsvisitorsearchrequest.d.ts +105 -0
- package/dist/esm/models/components/analyticsvisitorsearchrequest.d.ts.map +1 -0
- package/dist/esm/models/components/analyticsvisitorsearchrequest.js +84 -0
- package/dist/esm/models/components/analyticsvisitorsearchrequest.js.map +1 -0
- package/dist/esm/models/components/analyticsvisitorsearchresponse.d.ts +26 -0
- package/dist/esm/models/components/analyticsvisitorsearchresponse.d.ts.map +1 -0
- package/dist/esm/models/components/analyticsvisitorsearchresponse.js +32 -0
- package/dist/esm/models/components/analyticsvisitorsearchresponse.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +5 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +5 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/operations/analyticseventssearch.d.ts +23 -0
- package/dist/esm/models/operations/analyticseventssearch.d.ts.map +1 -0
- package/dist/esm/models/operations/analyticseventssearch.js +32 -0
- package/dist/esm/models/operations/analyticseventssearch.js.map +1 -0
- package/dist/esm/models/operations/analyticsvisitorssearch.d.ts +23 -0
- package/dist/esm/models/operations/analyticsvisitorssearch.d.ts.map +1 -0
- package/dist/esm/models/operations/analyticsvisitorssearch.js +32 -0
- package/dist/esm/models/operations/analyticsvisitorssearch.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/react-query/analyticsEventsSearch.d.ts +30 -0
- package/dist/esm/react-query/analyticsEventsSearch.d.ts.map +1 -0
- package/dist/esm/react-query/analyticsEventsSearch.js +42 -0
- package/dist/esm/react-query/analyticsEventsSearch.js.map +1 -0
- package/dist/esm/react-query/analyticsVisitorsSearch.d.ts +30 -0
- package/dist/esm/react-query/analyticsVisitorsSearch.d.ts.map +1 -0
- package/dist/esm/react-query/analyticsVisitorsSearch.js +42 -0
- package/dist/esm/react-query/analyticsVisitorsSearch.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.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 +8 -0
- package/dist/esm/sdk/analytics.js.map +1 -1
- package/dist/esm/sdk/events.d.ts +13 -0
- package/dist/esm/sdk/events.d.ts.map +1 -0
- package/dist/esm/sdk/events.js +18 -0
- package/dist/esm/sdk/events.js.map +1 -0
- package/dist/esm/sdk/visitors.d.ts +13 -0
- package/dist/esm/sdk/visitors.d.ts.map +1 -0
- package/dist/esm/sdk/visitors.js +18 -0
- package/dist/esm/sdk/visitors.js.map +1 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analyticsEventsSearch.ts +199 -0
- package/src/funcs/analyticsVisitorsSearch.ts +199 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/analyticsEventsSearch.ts +37 -0
- package/src/mcp-server/tools/analyticsVisitorsSearch.ts +37 -0
- package/src/models/components/analyticsevent.ts +2 -2
- package/src/models/components/analyticseventsearchrequest.ts +249 -0
- package/src/models/components/analyticseventsearchresponse.ts +78 -0
- package/src/models/components/analyticsvisitor.ts +90 -0
- package/src/models/components/analyticsvisitorsearchrequest.ts +241 -0
- package/src/models/components/analyticsvisitorsearchresponse.ts +78 -0
- package/src/models/components/index.ts +5 -0
- package/src/models/operations/analyticseventssearch.ts +72 -0
- package/src/models/operations/analyticsvisitorssearch.ts +73 -0
- package/src/models/operations/index.ts +2 -0
- package/src/react-query/analyticsEventsSearch.ts +112 -0
- package/src/react-query/analyticsVisitorsSearch.ts +112 -0
- package/src/react-query/index.ts +2 -0
- package/src/sdk/analytics.ts +12 -0
- package/src/sdk/events.ts +28 -0
- package/src/sdk/visitors.ts +28 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
AnalyticsVisitor,
|
|
12
|
+
AnalyticsVisitor$inboundSchema,
|
|
13
|
+
AnalyticsVisitor$Outbound,
|
|
14
|
+
AnalyticsVisitor$outboundSchema,
|
|
15
|
+
} from "./analyticsvisitor.js";
|
|
16
|
+
|
|
17
|
+
export type AnalyticsVisitorSearchResponse = {
|
|
18
|
+
/**
|
|
19
|
+
* Matching visitors, most recently active first. Visitors with the same last_seen are ordered by distinct_id, descending.
|
|
20
|
+
*/
|
|
21
|
+
visitors: Array<AnalyticsVisitor>;
|
|
22
|
+
/**
|
|
23
|
+
* Cursor for the next page, or null when there are no more rows. It continues the sequence at the snapshot its first page took.
|
|
24
|
+
*/
|
|
25
|
+
nextCursor: string | null;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const AnalyticsVisitorSearchResponse$inboundSchema: z.ZodType<
|
|
30
|
+
AnalyticsVisitorSearchResponse,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
visitors: z.array(AnalyticsVisitor$inboundSchema),
|
|
35
|
+
next_cursor: z.nullable(z.string()),
|
|
36
|
+
}).transform((v) => {
|
|
37
|
+
return remap$(v, {
|
|
38
|
+
"next_cursor": "nextCursor",
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type AnalyticsVisitorSearchResponse$Outbound = {
|
|
43
|
+
visitors: Array<AnalyticsVisitor$Outbound>;
|
|
44
|
+
next_cursor: string | null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const AnalyticsVisitorSearchResponse$outboundSchema: z.ZodType<
|
|
49
|
+
AnalyticsVisitorSearchResponse$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
AnalyticsVisitorSearchResponse
|
|
52
|
+
> = z.object({
|
|
53
|
+
visitors: z.array(AnalyticsVisitor$outboundSchema),
|
|
54
|
+
nextCursor: z.nullable(z.string()),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
nextCursor: "next_cursor",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export function analyticsVisitorSearchResponseToJSON(
|
|
62
|
+
analyticsVisitorSearchResponse: AnalyticsVisitorSearchResponse,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
AnalyticsVisitorSearchResponse$outboundSchema.parse(
|
|
66
|
+
analyticsVisitorSearchResponse,
|
|
67
|
+
),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
export function analyticsVisitorSearchResponseFromJSON(
|
|
71
|
+
jsonString: string,
|
|
72
|
+
): SafeParseResult<AnalyticsVisitorSearchResponse, SDKValidationError> {
|
|
73
|
+
return safeParse(
|
|
74
|
+
jsonString,
|
|
75
|
+
(x) => AnalyticsVisitorSearchResponse$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'AnalyticsVisitorSearchResponse' from JSON`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -33,6 +33,8 @@ export * from "./analyticscapturerequest.js";
|
|
|
33
33
|
export * from "./analyticscaptureresponse.js";
|
|
34
34
|
export * from "./analyticscreatedcapturekey.js";
|
|
35
35
|
export * from "./analyticsevent.js";
|
|
36
|
+
export * from "./analyticseventsearchrequest.js";
|
|
37
|
+
export * from "./analyticseventsearchresponse.js";
|
|
36
38
|
export * from "./analyticskeycreate.js";
|
|
37
39
|
export * from "./analyticskeylist.js";
|
|
38
40
|
export * from "./analyticsproject.js";
|
|
@@ -41,6 +43,9 @@ export * from "./analyticsprojectlist.js";
|
|
|
41
43
|
export * from "./analyticsprojectupdate.js";
|
|
42
44
|
export * from "./analyticsqueryrequest.js";
|
|
43
45
|
export * from "./analyticsqueryresponse.js";
|
|
46
|
+
export * from "./analyticsvisitor.js";
|
|
47
|
+
export * from "./analyticsvisitorsearchrequest.js";
|
|
48
|
+
export * from "./analyticsvisitorsearchresponse.js";
|
|
44
49
|
export * from "./appendagenttrialsrequest.js";
|
|
45
50
|
export * from "./authorizeintent.js";
|
|
46
51
|
export * from "./autochunkingstrategy.js";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AnalyticsEventsSearchRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the analytics project.
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
analyticsEventSearchRequest: components.AnalyticsEventSearchRequest;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const AnalyticsEventsSearchRequest$inboundSchema: z.ZodType<
|
|
22
|
+
AnalyticsEventsSearchRequest,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
id: z.string(),
|
|
27
|
+
AnalyticsEventSearchRequest:
|
|
28
|
+
components.AnalyticsEventSearchRequest$inboundSchema,
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"AnalyticsEventSearchRequest": "analyticsEventSearchRequest",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type AnalyticsEventsSearchRequest$Outbound = {
|
|
36
|
+
id: string;
|
|
37
|
+
AnalyticsEventSearchRequest: components.AnalyticsEventSearchRequest$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const AnalyticsEventsSearchRequest$outboundSchema: z.ZodType<
|
|
42
|
+
AnalyticsEventsSearchRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
AnalyticsEventsSearchRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
id: z.string(),
|
|
47
|
+
analyticsEventSearchRequest:
|
|
48
|
+
components.AnalyticsEventSearchRequest$outboundSchema,
|
|
49
|
+
}).transform((v) => {
|
|
50
|
+
return remap$(v, {
|
|
51
|
+
analyticsEventSearchRequest: "AnalyticsEventSearchRequest",
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export function analyticsEventsSearchRequestToJSON(
|
|
56
|
+
analyticsEventsSearchRequest: AnalyticsEventsSearchRequest,
|
|
57
|
+
): string {
|
|
58
|
+
return JSON.stringify(
|
|
59
|
+
AnalyticsEventsSearchRequest$outboundSchema.parse(
|
|
60
|
+
analyticsEventsSearchRequest,
|
|
61
|
+
),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
export function analyticsEventsSearchRequestFromJSON(
|
|
65
|
+
jsonString: string,
|
|
66
|
+
): SafeParseResult<AnalyticsEventsSearchRequest, SDKValidationError> {
|
|
67
|
+
return safeParse(
|
|
68
|
+
jsonString,
|
|
69
|
+
(x) => AnalyticsEventsSearchRequest$inboundSchema.parse(JSON.parse(x)),
|
|
70
|
+
`Failed to parse 'AnalyticsEventsSearchRequest' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AnalyticsVisitorsSearchRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* ID of the analytics project.
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
analyticsVisitorSearchRequest: components.AnalyticsVisitorSearchRequest;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const AnalyticsVisitorsSearchRequest$inboundSchema: z.ZodType<
|
|
22
|
+
AnalyticsVisitorsSearchRequest,
|
|
23
|
+
z.ZodTypeDef,
|
|
24
|
+
unknown
|
|
25
|
+
> = z.object({
|
|
26
|
+
id: z.string(),
|
|
27
|
+
AnalyticsVisitorSearchRequest:
|
|
28
|
+
components.AnalyticsVisitorSearchRequest$inboundSchema,
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"AnalyticsVisitorSearchRequest": "analyticsVisitorSearchRequest",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type AnalyticsVisitorsSearchRequest$Outbound = {
|
|
36
|
+
id: string;
|
|
37
|
+
AnalyticsVisitorSearchRequest:
|
|
38
|
+
components.AnalyticsVisitorSearchRequest$Outbound;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const AnalyticsVisitorsSearchRequest$outboundSchema: z.ZodType<
|
|
43
|
+
AnalyticsVisitorsSearchRequest$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
AnalyticsVisitorsSearchRequest
|
|
46
|
+
> = z.object({
|
|
47
|
+
id: z.string(),
|
|
48
|
+
analyticsVisitorSearchRequest:
|
|
49
|
+
components.AnalyticsVisitorSearchRequest$outboundSchema,
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
analyticsVisitorSearchRequest: "AnalyticsVisitorSearchRequest",
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export function analyticsVisitorsSearchRequestToJSON(
|
|
57
|
+
analyticsVisitorsSearchRequest: AnalyticsVisitorsSearchRequest,
|
|
58
|
+
): string {
|
|
59
|
+
return JSON.stringify(
|
|
60
|
+
AnalyticsVisitorsSearchRequest$outboundSchema.parse(
|
|
61
|
+
analyticsVisitorsSearchRequest,
|
|
62
|
+
),
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
export function analyticsVisitorsSearchRequestFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<AnalyticsVisitorsSearchRequest, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => AnalyticsVisitorsSearchRequest$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'AnalyticsVisitorsSearchRequest' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -7,6 +7,7 @@ export * from "./activateagentconnector.js";
|
|
|
7
7
|
export * from "./addmodelcatalogorgaccess.js";
|
|
8
8
|
export * from "./addteammember.js";
|
|
9
9
|
export * from "./analyticscapture.js";
|
|
10
|
+
export * from "./analyticseventssearch.js";
|
|
10
11
|
export * from "./analyticskeyscreate.js";
|
|
11
12
|
export * from "./analyticskeyslist.js";
|
|
12
13
|
export * from "./analyticskeysrevoke.js";
|
|
@@ -15,6 +16,7 @@ export * from "./analyticsprojectsget.js";
|
|
|
15
16
|
export * from "./analyticsprojectslist.js";
|
|
16
17
|
export * from "./analyticsprojectsupdate.js";
|
|
17
18
|
export * from "./analyticsquery.js";
|
|
19
|
+
export * from "./analyticsvisitorssearch.js";
|
|
18
20
|
export * from "./appendagentevaltrials.js";
|
|
19
21
|
export * from "./batchgetcompletionfeedback.js";
|
|
20
22
|
export * from "./batchgetresponsefeedback.js";
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { analyticsEventsSearch } from "../funcs/analyticsEventsSearch.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
28
|
+
import { useSDKContext } from "./_context.js";
|
|
29
|
+
import { MutationHookOptions } from "./_types.js";
|
|
30
|
+
|
|
31
|
+
export type AnalyticsEventsSearchMutationVariables = {
|
|
32
|
+
request: operations.AnalyticsEventsSearchRequest;
|
|
33
|
+
options?: RequestOptions;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type AnalyticsEventsSearchMutationData =
|
|
37
|
+
components.AnalyticsEventSearchResponse;
|
|
38
|
+
|
|
39
|
+
export type AnalyticsEventsSearchMutationError =
|
|
40
|
+
| errors.AnalyticsError
|
|
41
|
+
| SDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Search events in a time range
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* List individual events in a time range, newest first, with their properties. Optionally filter by event name, event properties, or one visitor's distinct_id. The range includes from and excludes to, and duplicate event IDs are returned once, so a search over a chart bucket's range with the same filters lists exactly the events that bucket counted. A page holds up to 100 events; pass next_cursor as cursor for the following page until it is null. The first page takes a snapshot from ClickHouse's clock before reading its rows and its cursor carries it, so every page of the sequence, the first included, reads only deliveries received at or before that snapshot and ages events out of retention as of it: no event repeats or is skipped, and events received after the snapshot, including a redelivery that revises a listed event, appear only when paging restarts without a cursor. One window blurs that boundary: ClickHouse stamps a receipt at whole seconds when an insert starts and commits its rows when it finishes, so a delivery stamped in or before the snapshot's second that commits after the first page was read is inside the sequence but missing from the first page; it joins from the next page, where an unlisted event it adds or moves ahead of the cursor is skipped and a listed event that a lower-hash redelivery moves behind the cursor repeats at its revised position. A cursor that does not decode, or one from another list, returns 400. A page whose events exceed the response size limit returns 413; request a smaller limit.
|
|
55
|
+
*/
|
|
56
|
+
export function useAnalyticsEventsSearchMutation(
|
|
57
|
+
options?: MutationHookOptions<
|
|
58
|
+
AnalyticsEventsSearchMutationData,
|
|
59
|
+
AnalyticsEventsSearchMutationError,
|
|
60
|
+
AnalyticsEventsSearchMutationVariables
|
|
61
|
+
>,
|
|
62
|
+
): UseMutationResult<
|
|
63
|
+
AnalyticsEventsSearchMutationData,
|
|
64
|
+
AnalyticsEventsSearchMutationError,
|
|
65
|
+
AnalyticsEventsSearchMutationVariables
|
|
66
|
+
> {
|
|
67
|
+
const client = useSDKContext();
|
|
68
|
+
return useMutation({
|
|
69
|
+
...buildAnalyticsEventsSearchMutation(client, options),
|
|
70
|
+
...options,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function mutationKeyAnalyticsEventsSearch(): MutationKey {
|
|
75
|
+
return ["@meetkai/mka1", "events", "search"];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function buildAnalyticsEventsSearchMutation(
|
|
79
|
+
client$: SDKCore,
|
|
80
|
+
hookOptions?: RequestOptions,
|
|
81
|
+
): {
|
|
82
|
+
mutationKey: MutationKey;
|
|
83
|
+
mutationFn: (
|
|
84
|
+
variables: AnalyticsEventsSearchMutationVariables,
|
|
85
|
+
) => Promise<AnalyticsEventsSearchMutationData>;
|
|
86
|
+
} {
|
|
87
|
+
return {
|
|
88
|
+
mutationKey: mutationKeyAnalyticsEventsSearch(),
|
|
89
|
+
mutationFn: function analyticsEventsSearchMutationFn({
|
|
90
|
+
request,
|
|
91
|
+
options,
|
|
92
|
+
}): Promise<AnalyticsEventsSearchMutationData> {
|
|
93
|
+
const mergedOptions = {
|
|
94
|
+
...hookOptions,
|
|
95
|
+
...options,
|
|
96
|
+
fetchOptions: {
|
|
97
|
+
...hookOptions?.fetchOptions,
|
|
98
|
+
...options?.fetchOptions,
|
|
99
|
+
signal: combineSignals(
|
|
100
|
+
hookOptions?.fetchOptions?.signal,
|
|
101
|
+
options?.fetchOptions?.signal,
|
|
102
|
+
),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
return unwrapAsync(analyticsEventsSearch(
|
|
106
|
+
client$,
|
|
107
|
+
request,
|
|
108
|
+
mergedOptions,
|
|
109
|
+
));
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { analyticsVisitorsSearch } from "../funcs/analyticsVisitorsSearch.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import * as errors from "../models/errors/index.js";
|
|
23
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
25
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
26
|
+
import * as operations from "../models/operations/index.js";
|
|
27
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
28
|
+
import { useSDKContext } from "./_context.js";
|
|
29
|
+
import { MutationHookOptions } from "./_types.js";
|
|
30
|
+
|
|
31
|
+
export type AnalyticsVisitorsSearchMutationVariables = {
|
|
32
|
+
request: operations.AnalyticsVisitorsSearchRequest;
|
|
33
|
+
options?: RequestOptions;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export type AnalyticsVisitorsSearchMutationData =
|
|
37
|
+
components.AnalyticsVisitorSearchResponse;
|
|
38
|
+
|
|
39
|
+
export type AnalyticsVisitorsSearchMutationError =
|
|
40
|
+
| errors.AnalyticsError
|
|
41
|
+
| SDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Search visitors in a time range
|
|
52
|
+
*
|
|
53
|
+
* @remarks
|
|
54
|
+
* List visitors with matching events in a time range, most recently active first. Each visitor is one distinct_id with the timestamps of its first and last matching event and its event count over the whole range, so for a range that receives no further events the number of visitors across all pages equals the unique_visitors query for the same range and filters. The range includes from and excludes to, and duplicate event IDs are counted once. A page holds up to 100 visitors; pass next_cursor as cursor for the following page until it is null. The first page takes a snapshot from ClickHouse's clock before reading its rows and its cursor carries it, so every page of the sequence, the first included, reads only deliveries received at or before that snapshot and ages events out of retention as of it: a visitor keeps the position, first_seen, last_seen and event_count the sequence started with, no visitor repeats or is skipped, and activity received after the snapshot appears only when paging restarts without a cursor. One window blurs that boundary: ClickHouse stamps a receipt at whole seconds when an insert starts and commits its rows when it finishes, so a delivery stamped in or before the snapshot's second that commits after the first page was read is inside the sequence but missing from the first page; it joins from the next page, where an unlisted visitor it adds or moves ahead of the cursor is skipped and a listed visitor whose winning delivery a lower-hash redelivery moves behind the cursor repeats with revised totals; a listed visitor's totals otherwise stay as listed. A cursor that does not decode, or one from another list, returns 400.
|
|
55
|
+
*/
|
|
56
|
+
export function useAnalyticsVisitorsSearchMutation(
|
|
57
|
+
options?: MutationHookOptions<
|
|
58
|
+
AnalyticsVisitorsSearchMutationData,
|
|
59
|
+
AnalyticsVisitorsSearchMutationError,
|
|
60
|
+
AnalyticsVisitorsSearchMutationVariables
|
|
61
|
+
>,
|
|
62
|
+
): UseMutationResult<
|
|
63
|
+
AnalyticsVisitorsSearchMutationData,
|
|
64
|
+
AnalyticsVisitorsSearchMutationError,
|
|
65
|
+
AnalyticsVisitorsSearchMutationVariables
|
|
66
|
+
> {
|
|
67
|
+
const client = useSDKContext();
|
|
68
|
+
return useMutation({
|
|
69
|
+
...buildAnalyticsVisitorsSearchMutation(client, options),
|
|
70
|
+
...options,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function mutationKeyAnalyticsVisitorsSearch(): MutationKey {
|
|
75
|
+
return ["@meetkai/mka1", "visitors", "search"];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function buildAnalyticsVisitorsSearchMutation(
|
|
79
|
+
client$: SDKCore,
|
|
80
|
+
hookOptions?: RequestOptions,
|
|
81
|
+
): {
|
|
82
|
+
mutationKey: MutationKey;
|
|
83
|
+
mutationFn: (
|
|
84
|
+
variables: AnalyticsVisitorsSearchMutationVariables,
|
|
85
|
+
) => Promise<AnalyticsVisitorsSearchMutationData>;
|
|
86
|
+
} {
|
|
87
|
+
return {
|
|
88
|
+
mutationKey: mutationKeyAnalyticsVisitorsSearch(),
|
|
89
|
+
mutationFn: function analyticsVisitorsSearchMutationFn({
|
|
90
|
+
request,
|
|
91
|
+
options,
|
|
92
|
+
}): Promise<AnalyticsVisitorsSearchMutationData> {
|
|
93
|
+
const mergedOptions = {
|
|
94
|
+
...hookOptions,
|
|
95
|
+
...options,
|
|
96
|
+
fetchOptions: {
|
|
97
|
+
...hookOptions?.fetchOptions,
|
|
98
|
+
...options?.fetchOptions,
|
|
99
|
+
signal: combineSignals(
|
|
100
|
+
hookOptions?.fetchOptions?.signal,
|
|
101
|
+
options?.fetchOptions?.signal,
|
|
102
|
+
),
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
return unwrapAsync(analyticsVisitorsSearch(
|
|
106
|
+
client$,
|
|
107
|
+
request,
|
|
108
|
+
mergedOptions,
|
|
109
|
+
));
|
|
110
|
+
},
|
|
111
|
+
};
|
|
112
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -33,6 +33,7 @@ export * from "./agentVersionsGetAgentVersion.js";
|
|
|
33
33
|
export * from "./agentVersionsListAgentVersions.js";
|
|
34
34
|
export * from "./agentVersionsRollbackAgentVersion.js";
|
|
35
35
|
export * from "./analyticsCapture.js";
|
|
36
|
+
export * from "./analyticsEventsSearch.js";
|
|
36
37
|
export * from "./analyticsKeysCreate.js";
|
|
37
38
|
export * from "./analyticsKeysList.js";
|
|
38
39
|
export * from "./analyticsKeysRevoke.js";
|
|
@@ -42,6 +43,7 @@ export * from "./analyticsProjectsGet.js";
|
|
|
42
43
|
export * from "./analyticsProjectsList.js";
|
|
43
44
|
export * from "./analyticsProjectsUpdate.js";
|
|
44
45
|
export * from "./analyticsQuery.js";
|
|
46
|
+
export * from "./analyticsVisitorsSearch.js";
|
|
45
47
|
export * from "./authApiKeyGetJwtFromKey.js";
|
|
46
48
|
export * from "./authApiKeysCreate.js";
|
|
47
49
|
export * from "./authApiKeysExchangeToken.js";
|
package/src/sdk/analytics.ts
CHANGED
|
@@ -8,8 +8,10 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
|
8
8
|
import * as components from "../models/components/index.js";
|
|
9
9
|
import * as operations from "../models/operations/index.js";
|
|
10
10
|
import { unwrapAsync } from "../types/fp.js";
|
|
11
|
+
import { Events } from "./events.js";
|
|
11
12
|
import { Keys } from "./keys.js";
|
|
12
13
|
import { Projects } from "./projects.js";
|
|
14
|
+
import { Visitors } from "./visitors.js";
|
|
13
15
|
|
|
14
16
|
export class Analytics extends ClientSDK {
|
|
15
17
|
private _projects?: Projects;
|
|
@@ -22,6 +24,16 @@ export class Analytics extends ClientSDK {
|
|
|
22
24
|
return (this._keys ??= new Keys(this._options));
|
|
23
25
|
}
|
|
24
26
|
|
|
27
|
+
private _events?: Events;
|
|
28
|
+
get events(): Events {
|
|
29
|
+
return (this._events ??= new Events(this._options));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
private _visitors?: Visitors;
|
|
33
|
+
get visitors(): Visitors {
|
|
34
|
+
return (this._visitors ??= new Visitors(this._options));
|
|
35
|
+
}
|
|
36
|
+
|
|
25
37
|
/**
|
|
26
38
|
* Durably accept a batch of events
|
|
27
39
|
*
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { analyticsEventsSearch } from "../funcs/analyticsEventsSearch.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as components from "../models/components/index.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class Events extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Search events in a time range
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* List individual events in a time range, newest first, with their properties. Optionally filter by event name, event properties, or one visitor's distinct_id. The range includes from and excludes to, and duplicate event IDs are returned once, so a search over a chart bucket's range with the same filters lists exactly the events that bucket counted. A page holds up to 100 events; pass next_cursor as cursor for the following page until it is null. The first page takes a snapshot from ClickHouse's clock before reading its rows and its cursor carries it, so every page of the sequence, the first included, reads only deliveries received at or before that snapshot and ages events out of retention as of it: no event repeats or is skipped, and events received after the snapshot, including a redelivery that revises a listed event, appear only when paging restarts without a cursor. One window blurs that boundary: ClickHouse stamps a receipt at whole seconds when an insert starts and commits its rows when it finishes, so a delivery stamped in or before the snapshot's second that commits after the first page was read is inside the sequence but missing from the first page; it joins from the next page, where an unlisted event it adds or moves ahead of the cursor is skipped and a listed event that a lower-hash redelivery moves behind the cursor repeats at its revised position. A cursor that does not decode, or one from another list, returns 400. A page whose events exceed the response size limit returns 413; request a smaller limit.
|
|
17
|
+
*/
|
|
18
|
+
async search(
|
|
19
|
+
request: operations.AnalyticsEventsSearchRequest,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): Promise<components.AnalyticsEventSearchResponse> {
|
|
22
|
+
return unwrapAsync(analyticsEventsSearch(
|
|
23
|
+
this,
|
|
24
|
+
request,
|
|
25
|
+
options,
|
|
26
|
+
));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { analyticsVisitorsSearch } from "../funcs/analyticsVisitorsSearch.js";
|
|
6
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
+
import * as components from "../models/components/index.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
10
|
+
|
|
11
|
+
export class Visitors extends ClientSDK {
|
|
12
|
+
/**
|
|
13
|
+
* Search visitors in a time range
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* List visitors with matching events in a time range, most recently active first. Each visitor is one distinct_id with the timestamps of its first and last matching event and its event count over the whole range, so for a range that receives no further events the number of visitors across all pages equals the unique_visitors query for the same range and filters. The range includes from and excludes to, and duplicate event IDs are counted once. A page holds up to 100 visitors; pass next_cursor as cursor for the following page until it is null. The first page takes a snapshot from ClickHouse's clock before reading its rows and its cursor carries it, so every page of the sequence, the first included, reads only deliveries received at or before that snapshot and ages events out of retention as of it: a visitor keeps the position, first_seen, last_seen and event_count the sequence started with, no visitor repeats or is skipped, and activity received after the snapshot appears only when paging restarts without a cursor. One window blurs that boundary: ClickHouse stamps a receipt at whole seconds when an insert starts and commits its rows when it finishes, so a delivery stamped in or before the snapshot's second that commits after the first page was read is inside the sequence but missing from the first page; it joins from the next page, where an unlisted visitor it adds or moves ahead of the cursor is skipped and a listed visitor whose winning delivery a lower-hash redelivery moves behind the cursor repeats with revised totals; a listed visitor's totals otherwise stay as listed. A cursor that does not decode, or one from another list, returns 400.
|
|
17
|
+
*/
|
|
18
|
+
async search(
|
|
19
|
+
request: operations.AnalyticsVisitorsSearchRequest,
|
|
20
|
+
options?: RequestOptions,
|
|
21
|
+
): Promise<components.AnalyticsVisitorSearchResponse> {
|
|
22
|
+
return unwrapAsync(analyticsVisitorsSearch(
|
|
23
|
+
this,
|
|
24
|
+
request,
|
|
25
|
+
options,
|
|
26
|
+
));
|
|
27
|
+
}
|
|
28
|
+
}
|