@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
|
@@ -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
|
+
AnalyticsEvent,
|
|
12
|
+
AnalyticsEvent$inboundSchema,
|
|
13
|
+
AnalyticsEvent$Outbound,
|
|
14
|
+
AnalyticsEvent$outboundSchema,
|
|
15
|
+
} from "./analyticsevent.js";
|
|
16
|
+
|
|
17
|
+
export type AnalyticsEventSearchResponse = {
|
|
18
|
+
/**
|
|
19
|
+
* Matching events, newest first. Events with the same timestamp are ordered by event_id, descending.
|
|
20
|
+
*/
|
|
21
|
+
events: Array<AnalyticsEvent>;
|
|
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 AnalyticsEventSearchResponse$inboundSchema: z.ZodType<
|
|
30
|
+
AnalyticsEventSearchResponse,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
events: z.array(AnalyticsEvent$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 AnalyticsEventSearchResponse$Outbound = {
|
|
43
|
+
events: Array<AnalyticsEvent$Outbound>;
|
|
44
|
+
next_cursor: string | null;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const AnalyticsEventSearchResponse$outboundSchema: z.ZodType<
|
|
49
|
+
AnalyticsEventSearchResponse$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
AnalyticsEventSearchResponse
|
|
52
|
+
> = z.object({
|
|
53
|
+
events: z.array(AnalyticsEvent$outboundSchema),
|
|
54
|
+
nextCursor: z.nullable(z.string()),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
nextCursor: "next_cursor",
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export function analyticsEventSearchResponseToJSON(
|
|
62
|
+
analyticsEventSearchResponse: AnalyticsEventSearchResponse,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
AnalyticsEventSearchResponse$outboundSchema.parse(
|
|
66
|
+
analyticsEventSearchResponse,
|
|
67
|
+
),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
export function analyticsEventSearchResponseFromJSON(
|
|
71
|
+
jsonString: string,
|
|
72
|
+
): SafeParseResult<AnalyticsEventSearchResponse, SDKValidationError> {
|
|
73
|
+
return safeParse(
|
|
74
|
+
jsonString,
|
|
75
|
+
(x) => AnalyticsEventSearchResponse$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
+
`Failed to parse 'AnalyticsEventSearchResponse' from JSON`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
|
|
11
|
+
export type AnalyticsVisitor = {
|
|
12
|
+
/**
|
|
13
|
+
* The visitor's distinct_id as sent with their events.
|
|
14
|
+
*/
|
|
15
|
+
distinctId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Timestamp of the visitor's earliest matching event in the time range, in UTC with milliseconds.
|
|
18
|
+
*/
|
|
19
|
+
firstSeen: Date;
|
|
20
|
+
/**
|
|
21
|
+
* Timestamp of the visitor's latest matching event in the time range, in UTC with milliseconds.
|
|
22
|
+
*/
|
|
23
|
+
lastSeen: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Number of matching events from this visitor across the whole time range, not only this page.
|
|
26
|
+
*/
|
|
27
|
+
eventCount: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const AnalyticsVisitor$inboundSchema: z.ZodType<
|
|
32
|
+
AnalyticsVisitor,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
distinct_id: z.string(),
|
|
37
|
+
first_seen: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
38
|
+
last_seen: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
39
|
+
event_count: z.number().int(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"distinct_id": "distinctId",
|
|
43
|
+
"first_seen": "firstSeen",
|
|
44
|
+
"last_seen": "lastSeen",
|
|
45
|
+
"event_count": "eventCount",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type AnalyticsVisitor$Outbound = {
|
|
50
|
+
distinct_id: string;
|
|
51
|
+
first_seen: string;
|
|
52
|
+
last_seen: string;
|
|
53
|
+
event_count: number;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const AnalyticsVisitor$outboundSchema: z.ZodType<
|
|
58
|
+
AnalyticsVisitor$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
AnalyticsVisitor
|
|
61
|
+
> = z.object({
|
|
62
|
+
distinctId: z.string(),
|
|
63
|
+
firstSeen: z.date().transform(v => v.toISOString()),
|
|
64
|
+
lastSeen: z.date().transform(v => v.toISOString()),
|
|
65
|
+
eventCount: z.number().int(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return remap$(v, {
|
|
68
|
+
distinctId: "distinct_id",
|
|
69
|
+
firstSeen: "first_seen",
|
|
70
|
+
lastSeen: "last_seen",
|
|
71
|
+
eventCount: "event_count",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function analyticsVisitorToJSON(
|
|
76
|
+
analyticsVisitor: AnalyticsVisitor,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
AnalyticsVisitor$outboundSchema.parse(analyticsVisitor),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
export function analyticsVisitorFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<AnalyticsVisitor, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) => AnalyticsVisitor$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
+
`Failed to parse 'AnalyticsVisitor' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* 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.
|
|
14
|
+
*/
|
|
15
|
+
export const AnalyticsVisitorSearchRequestOp = {
|
|
16
|
+
Eq: "eq",
|
|
17
|
+
Neq: "neq",
|
|
18
|
+
Gt: "gt",
|
|
19
|
+
Gte: "gte",
|
|
20
|
+
Lt: "lt",
|
|
21
|
+
Lte: "lte",
|
|
22
|
+
Exists: "exists",
|
|
23
|
+
NotExists: "not_exists",
|
|
24
|
+
} as const;
|
|
25
|
+
/**
|
|
26
|
+
* 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.
|
|
27
|
+
*/
|
|
28
|
+
export type AnalyticsVisitorSearchRequestOp = ClosedEnum<
|
|
29
|
+
typeof AnalyticsVisitorSearchRequestOp
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Value to compare. The number 1 differs from the string '1'. Omit for exists and not_exists.
|
|
34
|
+
*/
|
|
35
|
+
export type AnalyticsVisitorSearchRequestValue = string | number | boolean;
|
|
36
|
+
|
|
37
|
+
export type AnalyticsVisitorSearchRequestFilters = {
|
|
38
|
+
/**
|
|
39
|
+
* Event property to filter. Property names are literal keys, not nested paths.
|
|
40
|
+
*/
|
|
41
|
+
property: string;
|
|
42
|
+
/**
|
|
43
|
+
* 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.
|
|
44
|
+
*/
|
|
45
|
+
op: AnalyticsVisitorSearchRequestOp;
|
|
46
|
+
/**
|
|
47
|
+
* Value to compare. The number 1 differs from the string '1'. Omit for exists and not_exists.
|
|
48
|
+
*/
|
|
49
|
+
value?: string | number | boolean | null | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type AnalyticsVisitorSearchRequest = {
|
|
53
|
+
/**
|
|
54
|
+
* 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.
|
|
55
|
+
*/
|
|
56
|
+
from: Date;
|
|
57
|
+
/**
|
|
58
|
+
* 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.
|
|
59
|
+
*/
|
|
60
|
+
to: Date;
|
|
61
|
+
/**
|
|
62
|
+
* Only include events with this exact name. Omit to include all event names.
|
|
63
|
+
*/
|
|
64
|
+
eventName?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Property filters combined with AND. An event must match every filter.
|
|
67
|
+
*/
|
|
68
|
+
filters?: Array<AnalyticsVisitorSearchRequestFilters> | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Maximum number of rows in this page.
|
|
71
|
+
*/
|
|
72
|
+
limit?: number | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Opaque cursor of at most 4096 characters, copied from next_cursor of the previous page. Omit for the first page, which takes the snapshot the whole sequence reads at. Cursors belong to one list and one sort order; a cursor that does not decode, or one from another list, returns 400. A cursor is a position, not a capability: one that decodes only moves the caller within the same project.
|
|
75
|
+
*/
|
|
76
|
+
cursor?: string | undefined;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const AnalyticsVisitorSearchRequestOp$inboundSchema: z.ZodNativeEnum<
|
|
81
|
+
typeof AnalyticsVisitorSearchRequestOp
|
|
82
|
+
> = z.nativeEnum(AnalyticsVisitorSearchRequestOp);
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const AnalyticsVisitorSearchRequestOp$outboundSchema: z.ZodNativeEnum<
|
|
85
|
+
typeof AnalyticsVisitorSearchRequestOp
|
|
86
|
+
> = AnalyticsVisitorSearchRequestOp$inboundSchema;
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const AnalyticsVisitorSearchRequestValue$inboundSchema: z.ZodType<
|
|
90
|
+
AnalyticsVisitorSearchRequestValue,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
unknown
|
|
93
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
94
|
+
/** @internal */
|
|
95
|
+
export type AnalyticsVisitorSearchRequestValue$Outbound =
|
|
96
|
+
| string
|
|
97
|
+
| number
|
|
98
|
+
| boolean;
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const AnalyticsVisitorSearchRequestValue$outboundSchema: z.ZodType<
|
|
102
|
+
AnalyticsVisitorSearchRequestValue$Outbound,
|
|
103
|
+
z.ZodTypeDef,
|
|
104
|
+
AnalyticsVisitorSearchRequestValue
|
|
105
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
106
|
+
|
|
107
|
+
export function analyticsVisitorSearchRequestValueToJSON(
|
|
108
|
+
analyticsVisitorSearchRequestValue: AnalyticsVisitorSearchRequestValue,
|
|
109
|
+
): string {
|
|
110
|
+
return JSON.stringify(
|
|
111
|
+
AnalyticsVisitorSearchRequestValue$outboundSchema.parse(
|
|
112
|
+
analyticsVisitorSearchRequestValue,
|
|
113
|
+
),
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
export function analyticsVisitorSearchRequestValueFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<AnalyticsVisitorSearchRequestValue, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) =>
|
|
122
|
+
AnalyticsVisitorSearchRequestValue$inboundSchema.parse(JSON.parse(x)),
|
|
123
|
+
`Failed to parse 'AnalyticsVisitorSearchRequestValue' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** @internal */
|
|
128
|
+
export const AnalyticsVisitorSearchRequestFilters$inboundSchema: z.ZodType<
|
|
129
|
+
AnalyticsVisitorSearchRequestFilters,
|
|
130
|
+
z.ZodTypeDef,
|
|
131
|
+
unknown
|
|
132
|
+
> = z.object({
|
|
133
|
+
property: z.string(),
|
|
134
|
+
op: AnalyticsVisitorSearchRequestOp$inboundSchema,
|
|
135
|
+
value: z.nullable(z.union([z.string(), z.number(), z.boolean()])).optional(),
|
|
136
|
+
});
|
|
137
|
+
/** @internal */
|
|
138
|
+
export type AnalyticsVisitorSearchRequestFilters$Outbound = {
|
|
139
|
+
property: string;
|
|
140
|
+
op: string;
|
|
141
|
+
value?: string | number | boolean | null | undefined;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
/** @internal */
|
|
145
|
+
export const AnalyticsVisitorSearchRequestFilters$outboundSchema: z.ZodType<
|
|
146
|
+
AnalyticsVisitorSearchRequestFilters$Outbound,
|
|
147
|
+
z.ZodTypeDef,
|
|
148
|
+
AnalyticsVisitorSearchRequestFilters
|
|
149
|
+
> = z.object({
|
|
150
|
+
property: z.string(),
|
|
151
|
+
op: AnalyticsVisitorSearchRequestOp$outboundSchema,
|
|
152
|
+
value: z.nullable(z.union([z.string(), z.number(), z.boolean()])).optional(),
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
export function analyticsVisitorSearchRequestFiltersToJSON(
|
|
156
|
+
analyticsVisitorSearchRequestFilters: AnalyticsVisitorSearchRequestFilters,
|
|
157
|
+
): string {
|
|
158
|
+
return JSON.stringify(
|
|
159
|
+
AnalyticsVisitorSearchRequestFilters$outboundSchema.parse(
|
|
160
|
+
analyticsVisitorSearchRequestFilters,
|
|
161
|
+
),
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
export function analyticsVisitorSearchRequestFiltersFromJSON(
|
|
165
|
+
jsonString: string,
|
|
166
|
+
): SafeParseResult<AnalyticsVisitorSearchRequestFilters, SDKValidationError> {
|
|
167
|
+
return safeParse(
|
|
168
|
+
jsonString,
|
|
169
|
+
(x) =>
|
|
170
|
+
AnalyticsVisitorSearchRequestFilters$inboundSchema.parse(JSON.parse(x)),
|
|
171
|
+
`Failed to parse 'AnalyticsVisitorSearchRequestFilters' from JSON`,
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** @internal */
|
|
176
|
+
export const AnalyticsVisitorSearchRequest$inboundSchema: z.ZodType<
|
|
177
|
+
AnalyticsVisitorSearchRequest,
|
|
178
|
+
z.ZodTypeDef,
|
|
179
|
+
unknown
|
|
180
|
+
> = z.object({
|
|
181
|
+
from: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
182
|
+
to: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
183
|
+
event_name: z.string().optional(),
|
|
184
|
+
filters: z.array(
|
|
185
|
+
z.lazy(() => AnalyticsVisitorSearchRequestFilters$inboundSchema),
|
|
186
|
+
).optional(),
|
|
187
|
+
limit: z.number().int().default(50),
|
|
188
|
+
cursor: z.string().optional(),
|
|
189
|
+
}).transform((v) => {
|
|
190
|
+
return remap$(v, {
|
|
191
|
+
"event_name": "eventName",
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
/** @internal */
|
|
195
|
+
export type AnalyticsVisitorSearchRequest$Outbound = {
|
|
196
|
+
from: string;
|
|
197
|
+
to: string;
|
|
198
|
+
event_name?: string | undefined;
|
|
199
|
+
filters?: Array<AnalyticsVisitorSearchRequestFilters$Outbound> | undefined;
|
|
200
|
+
limit: number;
|
|
201
|
+
cursor?: string | undefined;
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
/** @internal */
|
|
205
|
+
export const AnalyticsVisitorSearchRequest$outboundSchema: z.ZodType<
|
|
206
|
+
AnalyticsVisitorSearchRequest$Outbound,
|
|
207
|
+
z.ZodTypeDef,
|
|
208
|
+
AnalyticsVisitorSearchRequest
|
|
209
|
+
> = z.object({
|
|
210
|
+
from: z.date().transform(v => v.toISOString()),
|
|
211
|
+
to: z.date().transform(v => v.toISOString()),
|
|
212
|
+
eventName: z.string().optional(),
|
|
213
|
+
filters: z.array(
|
|
214
|
+
z.lazy(() => AnalyticsVisitorSearchRequestFilters$outboundSchema),
|
|
215
|
+
).optional(),
|
|
216
|
+
limit: z.number().int().default(50),
|
|
217
|
+
cursor: z.string().optional(),
|
|
218
|
+
}).transform((v) => {
|
|
219
|
+
return remap$(v, {
|
|
220
|
+
eventName: "event_name",
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
export function analyticsVisitorSearchRequestToJSON(
|
|
225
|
+
analyticsVisitorSearchRequest: AnalyticsVisitorSearchRequest,
|
|
226
|
+
): string {
|
|
227
|
+
return JSON.stringify(
|
|
228
|
+
AnalyticsVisitorSearchRequest$outboundSchema.parse(
|
|
229
|
+
analyticsVisitorSearchRequest,
|
|
230
|
+
),
|
|
231
|
+
);
|
|
232
|
+
}
|
|
233
|
+
export function analyticsVisitorSearchRequestFromJSON(
|
|
234
|
+
jsonString: string,
|
|
235
|
+
): SafeParseResult<AnalyticsVisitorSearchRequest, SDKValidationError> {
|
|
236
|
+
return safeParse(
|
|
237
|
+
jsonString,
|
|
238
|
+
(x) => AnalyticsVisitorSearchRequest$inboundSchema.parse(JSON.parse(x)),
|
|
239
|
+
`Failed to parse 'AnalyticsVisitorSearchRequest' from JSON`,
|
|
240
|
+
);
|
|
241
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -25,6 +25,7 @@ export const EffectivePriceRowSource = {
|
|
|
25
25
|
OrgOverride: "org_override",
|
|
26
26
|
ClusterDefault: "cluster_default",
|
|
27
27
|
Unpriced: "unpriced",
|
|
28
|
+
Auto: "auto",
|
|
28
29
|
} as const;
|
|
29
30
|
export type EffectivePriceRowSource = ClosedEnum<
|
|
30
31
|
typeof EffectivePriceRowSource
|
|
@@ -34,6 +35,7 @@ export type EffectivePriceRow = {
|
|
|
34
35
|
model: string;
|
|
35
36
|
rates: EffectivePriceRowRates | null;
|
|
36
37
|
source: EffectivePriceRowSource;
|
|
38
|
+
resolvesTo?: Array<string> | undefined;
|
|
37
39
|
};
|
|
38
40
|
|
|
39
41
|
/** @internal */
|
|
@@ -133,12 +135,18 @@ export const EffectivePriceRow$inboundSchema: z.ZodType<
|
|
|
133
135
|
model: z.string(),
|
|
134
136
|
rates: z.nullable(z.lazy(() => EffectivePriceRowRates$inboundSchema)),
|
|
135
137
|
source: EffectivePriceRowSource$inboundSchema,
|
|
138
|
+
resolves_to: z.array(z.string()).optional(),
|
|
139
|
+
}).transform((v) => {
|
|
140
|
+
return remap$(v, {
|
|
141
|
+
"resolves_to": "resolvesTo",
|
|
142
|
+
});
|
|
136
143
|
});
|
|
137
144
|
/** @internal */
|
|
138
145
|
export type EffectivePriceRow$Outbound = {
|
|
139
146
|
model: string;
|
|
140
147
|
rates: EffectivePriceRowRates$Outbound | null;
|
|
141
148
|
source: string;
|
|
149
|
+
resolves_to?: Array<string> | undefined;
|
|
142
150
|
};
|
|
143
151
|
|
|
144
152
|
/** @internal */
|
|
@@ -150,6 +158,11 @@ export const EffectivePriceRow$outboundSchema: z.ZodType<
|
|
|
150
158
|
model: z.string(),
|
|
151
159
|
rates: z.nullable(z.lazy(() => EffectivePriceRowRates$outboundSchema)),
|
|
152
160
|
source: EffectivePriceRowSource$outboundSchema,
|
|
161
|
+
resolvesTo: z.array(z.string()).optional(),
|
|
162
|
+
}).transform((v) => {
|
|
163
|
+
return remap$(v, {
|
|
164
|
+
resolvesTo: "resolves_to",
|
|
165
|
+
});
|
|
153
166
|
});
|
|
154
167
|
|
|
155
168
|
export function effectivePriceRowToJSON(
|
|
@@ -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
|
+
}
|