@meetkai/mka1 0.54.44 → 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 +3140 -2631
- package/bin/mcp-server.js.map +23 -12
- 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/funcs/llmModelsListEffectivePrices.d.ts +1 -1
- package/dist/commonjs/funcs/llmModelsListEffectivePrices.js +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.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/mcp-server/tools/llmModelsListEffectivePrices.js +1 -1
- package/dist/commonjs/mcp-server/tools/llmModelsListEffectivePrices.js.map +1 -1
- 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/effectivepricerow.d.ts +3 -0
- package/dist/commonjs/models/components/effectivepricerow.d.ts.map +1 -1
- package/dist/commonjs/models/components/effectivepricerow.js +11 -0
- package/dist/commonjs/models/components/effectivepricerow.js.map +1 -1
- 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/react-query/llmModelsListEffectivePrices.d.ts +2 -2
- package/dist/commonjs/react-query/llmModelsListEffectivePrices.js +2 -2
- 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/models.d.ts +1 -1
- package/dist/commonjs/sdk/models.js +1 -1
- 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/funcs/llmModelsListEffectivePrices.d.ts +1 -1
- package/dist/esm/funcs/llmModelsListEffectivePrices.js +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.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/mcp-server/tools/llmModelsListEffectivePrices.js +1 -1
- package/dist/esm/mcp-server/tools/llmModelsListEffectivePrices.js.map +1 -1
- 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/effectivepricerow.d.ts +3 -0
- package/dist/esm/models/components/effectivepricerow.d.ts.map +1 -1
- package/dist/esm/models/components/effectivepricerow.js +11 -0
- package/dist/esm/models/components/effectivepricerow.js.map +1 -1
- 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/react-query/llmModelsListEffectivePrices.d.ts +2 -2
- package/dist/esm/react-query/llmModelsListEffectivePrices.js +2 -2
- 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/models.d.ts +1 -1
- package/dist/esm/sdk/models.js +1 -1
- 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/funcs/llmModelsListEffectivePrices.ts +1 -1
- 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/mcp-server/tools/llmModelsListEffectivePrices.ts +1 -1
- 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/effectivepricerow.ts +13 -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/react-query/llmModelsListEffectivePrices.ts +2 -2
- package/src/sdk/analytics.ts +12 -0
- package/src/sdk/events.ts +28 -0
- package/src/sdk/models.ts +1 -1
- package/src/sdk/visitors.ts +28 -0
|
@@ -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";
|
|
@@ -54,7 +54,7 @@ export type LlmModelsListEffectivePricesQueryError =
|
|
|
54
54
|
* List effective prices for the caller's models
|
|
55
55
|
*
|
|
56
56
|
* @remarks
|
|
57
|
-
* For every active model, returns its registry-aware price: an org row, a cluster default for cluster lineage, or unpriced ($0).
|
|
57
|
+
* For every active model, returns its registry-aware price: an org row, a cluster default for cluster lineage, or unpriced ($0). Also lists the `auto` routing alias, priced at the per-metric maximum across every model it can be billed as (`resolves_to`): a judge policy's active candidates, or the direct/YAML target plus any reroute target it can fall through to.
|
|
58
58
|
*/
|
|
59
59
|
export function useLlmModelsListEffectivePrices(
|
|
60
60
|
request: operations.ListEffectivePricesRequest,
|
|
@@ -81,7 +81,7 @@ export function useLlmModelsListEffectivePrices(
|
|
|
81
81
|
* List effective prices for the caller's models
|
|
82
82
|
*
|
|
83
83
|
* @remarks
|
|
84
|
-
* For every active model, returns its registry-aware price: an org row, a cluster default for cluster lineage, or unpriced ($0).
|
|
84
|
+
* For every active model, returns its registry-aware price: an org row, a cluster default for cluster lineage, or unpriced ($0). Also lists the `auto` routing alias, priced at the per-metric maximum across every model it can be billed as (`resolves_to`): a judge policy's active candidates, or the direct/YAML target plus any reroute target it can fall through to.
|
|
85
85
|
*/
|
|
86
86
|
export function useLlmModelsListEffectivePricesSuspense(
|
|
87
87
|
request: operations.ListEffectivePricesRequest,
|
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
|
+
}
|
package/src/sdk/models.ts
CHANGED
|
@@ -455,7 +455,7 @@ export class Models extends ClientSDK {
|
|
|
455
455
|
* List effective prices for the caller's models
|
|
456
456
|
*
|
|
457
457
|
* @remarks
|
|
458
|
-
* For every active model, returns its registry-aware price: an org row, a cluster default for cluster lineage, or unpriced ($0).
|
|
458
|
+
* For every active model, returns its registry-aware price: an org row, a cluster default for cluster lineage, or unpriced ($0). Also lists the `auto` routing alias, priced at the per-metric maximum across every model it can be billed as (`resolves_to`): a judge policy's active candidates, or the direct/YAML target plus any reroute target it can fall through to.
|
|
459
459
|
*/
|
|
460
460
|
async listEffectivePrices(
|
|
461
461
|
request: operations.ListEffectivePricesRequest,
|
|
@@ -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
|
+
}
|