@steamsets/client-ts 0.34.5 → 0.34.7
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 +12 -0
- package/funcs/analyticsGetBivariate.d.ts +16 -0
- package/funcs/analyticsGetBivariate.d.ts.map +1 -0
- package/funcs/analyticsGetBivariate.js +134 -0
- package/funcs/analyticsGetBivariate.js.map +1 -0
- package/funcs/analyticsGetDistribution.d.ts +16 -0
- package/funcs/analyticsGetDistribution.d.ts.map +1 -0
- package/funcs/analyticsGetDistribution.js +134 -0
- package/funcs/analyticsGetDistribution.js.map +1 -0
- package/funcs/analyticsGetMetricByScope.d.ts +16 -0
- package/funcs/analyticsGetMetricByScope.d.ts.map +1 -0
- package/funcs/analyticsGetMetricByScope.js +134 -0
- package/funcs/analyticsGetMetricByScope.js.map +1 -0
- package/funcs/analyticsGetMyPercentiles.d.ts +16 -0
- package/funcs/analyticsGetMyPercentiles.d.ts.map +1 -0
- package/funcs/analyticsGetMyPercentiles.js +134 -0
- package/funcs/analyticsGetMyPercentiles.js.map +1 -0
- package/funcs/analyticsGetTrend.d.ts +16 -0
- package/funcs/analyticsGetTrend.d.ts.map +1 -0
- package/funcs/analyticsGetTrend.js +134 -0
- package/funcs/analyticsGetTrend.js.map +1 -0
- package/funcs/analyticsListMetrics.d.ts +15 -0
- package/funcs/analyticsListMetrics.d.ts.map +1 -0
- package/funcs/analyticsListMetrics.js +121 -0
- package/funcs/analyticsListMetrics.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/analyticsbin.d.ts +12 -0
- package/models/components/analyticsbin.d.ts.map +1 -0
- package/models/components/analyticsbin.js +58 -0
- package/models/components/analyticsbin.js.map +1 -0
- package/models/components/analyticsbivariate.d.ts +15 -0
- package/models/components/analyticsbivariate.d.ts.map +1 -0
- package/models/components/analyticsbivariate.js +57 -0
- package/models/components/analyticsbivariate.js.map +1 -0
- package/models/components/analyticsbivariatebucket.d.ts +12 -0
- package/models/components/analyticsbivariatebucket.d.ts.map +1 -0
- package/models/components/analyticsbivariatebucket.js +58 -0
- package/models/components/analyticsbivariatebucket.js.map +1 -0
- package/models/components/analyticsdistribution.d.ts +17 -0
- package/models/components/analyticsdistribution.d.ts.map +1 -0
- package/models/components/analyticsdistribution.js +59 -0
- package/models/components/analyticsdistribution.js.map +1 -0
- package/models/components/analyticsdomainentry.d.ts +14 -0
- package/models/components/analyticsdomainentry.d.ts.map +1 -0
- package/models/components/analyticsdomainentry.js +54 -0
- package/models/components/analyticsdomainentry.js.map +1 -0
- package/models/components/analyticsgetbivariaterequestbody.d.ts +49 -0
- package/models/components/analyticsgetbivariaterequestbody.d.ts.map +1 -0
- package/models/components/analyticsgetbivariaterequestbody.js +69 -0
- package/models/components/analyticsgetbivariaterequestbody.js.map +1 -0
- package/models/components/analyticsgetdistributionrequestbody.d.ts +30 -0
- package/models/components/analyticsgetdistributionrequestbody.d.ts.map +1 -0
- package/models/components/analyticsgetdistributionrequestbody.js +57 -0
- package/models/components/analyticsgetdistributionrequestbody.js.map +1 -0
- package/models/components/analyticsgetmetricbyscoperequestbody.d.ts +58 -0
- package/models/components/analyticsgetmetricbyscoperequestbody.d.ts.map +1 -0
- package/models/components/analyticsgetmetricbyscoperequestbody.js +73 -0
- package/models/components/analyticsgetmetricbyscoperequestbody.js.map +1 -0
- package/models/components/analyticsgetmypercentilesrequestbody.d.ts +19 -0
- package/models/components/analyticsgetmypercentilesrequestbody.d.ts.map +1 -0
- package/models/components/analyticsgetmypercentilesrequestbody.js +56 -0
- package/models/components/analyticsgetmypercentilesrequestbody.js.map +1 -0
- package/models/components/analyticsgettrendrequestbody.d.ts +50 -0
- package/models/components/analyticsgettrendrequestbody.d.ts.map +1 -0
- package/models/components/analyticsgettrendrequestbody.js +68 -0
- package/models/components/analyticsgettrendrequestbody.js.map +1 -0
- package/models/components/analyticslistmetricsresponsebody.d.ts +15 -0
- package/models/components/analyticslistmetricsresponsebody.d.ts.map +1 -0
- package/models/components/analyticslistmetricsresponsebody.js +57 -0
- package/models/components/analyticslistmetricsresponsebody.js.map +1 -0
- package/models/components/analyticsmetricbyscope.d.ts +15 -0
- package/models/components/analyticsmetricbyscope.d.ts.map +1 -0
- package/models/components/analyticsmetricbyscope.js +57 -0
- package/models/components/analyticsmetricbyscope.js.map +1 -0
- package/models/components/analyticsmetricentry.d.ts +12 -0
- package/models/components/analyticsmetricentry.d.ts.map +1 -0
- package/models/components/analyticsmetricentry.js +52 -0
- package/models/components/analyticsmetricentry.js.map +1 -0
- package/models/components/analyticsmypercentiles.d.ts +16 -0
- package/models/components/analyticsmypercentiles.d.ts.map +1 -0
- package/models/components/analyticsmypercentiles.js +58 -0
- package/models/components/analyticsmypercentiles.js.map +1 -0
- package/models/components/analyticspercentile.d.ts +12 -0
- package/models/components/analyticspercentile.d.ts.map +1 -0
- package/models/components/analyticspercentile.js +52 -0
- package/models/components/analyticspercentile.js.map +1 -0
- package/models/components/analyticsscopebucket.d.ts +29 -0
- package/models/components/analyticsscopebucket.d.ts.map +1 -0
- package/models/components/analyticsscopebucket.js +54 -0
- package/models/components/analyticsscopebucket.js.map +1 -0
- package/models/components/analyticsscopeentry.d.ts +12 -0
- package/models/components/analyticsscopeentry.d.ts.map +1 -0
- package/models/components/analyticsscopeentry.js +57 -0
- package/models/components/analyticsscopeentry.js.map +1 -0
- package/models/components/analyticssummary.d.ts +16 -0
- package/models/components/analyticssummary.d.ts.map +1 -0
- package/models/components/analyticssummary.js +56 -0
- package/models/components/analyticssummary.js.map +1 -0
- package/models/components/analyticstrend.d.ts +15 -0
- package/models/components/analyticstrend.d.ts.map +1 -0
- package/models/components/analyticstrend.js +57 -0
- package/models/components/analyticstrend.js.map +1 -0
- package/models/components/analyticstrendpoint.d.ts +14 -0
- package/models/components/analyticstrendpoint.d.ts.map +1 -0
- package/models/components/analyticstrendpoint.js +54 -0
- package/models/components/analyticstrendpoint.js.map +1 -0
- package/models/components/index.d.ts +20 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +20 -0
- package/models/components/index.js.map +1 -1
- package/models/operations/analyticsgetbivariate.d.ts +15 -0
- package/models/operations/analyticsgetbivariate.d.ts.map +1 -0
- package/models/operations/analyticsgetbivariate.js +58 -0
- package/models/operations/analyticsgetbivariate.js.map +1 -0
- package/models/operations/analyticsgetdistribution.d.ts +15 -0
- package/models/operations/analyticsgetdistribution.d.ts.map +1 -0
- package/models/operations/analyticsgetdistribution.js +59 -0
- package/models/operations/analyticsgetdistribution.js.map +1 -0
- package/models/operations/analyticsgetmetricbyscope.d.ts +15 -0
- package/models/operations/analyticsgetmetricbyscope.d.ts.map +1 -0
- package/models/operations/analyticsgetmetricbyscope.js +59 -0
- package/models/operations/analyticsgetmetricbyscope.js.map +1 -0
- package/models/operations/analyticsgetmypercentiles.d.ts +15 -0
- package/models/operations/analyticsgetmypercentiles.d.ts.map +1 -0
- package/models/operations/analyticsgetmypercentiles.js +59 -0
- package/models/operations/analyticsgetmypercentiles.js.map +1 -0
- package/models/operations/analyticsgettrend.d.ts +15 -0
- package/models/operations/analyticsgettrend.d.ts.map +1 -0
- package/models/operations/analyticsgettrend.js +58 -0
- package/models/operations/analyticsgettrend.js.map +1 -0
- package/models/operations/analyticslistmetrics.d.ts +15 -0
- package/models/operations/analyticslistmetrics.d.ts.map +1 -0
- package/models/operations/analyticslistmetrics.js +59 -0
- package/models/operations/analyticslistmetrics.js.map +1 -0
- package/models/operations/index.d.ts +6 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +6 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/analytics.d.ts +25 -0
- package/sdk/analytics.d.ts.map +1 -1
- package/sdk/analytics.js +42 -0
- package/sdk/analytics.js.map +1 -1
- package/src/funcs/analyticsGetBivariate.ts +188 -0
- package/src/funcs/analyticsGetDistribution.ts +190 -0
- package/src/funcs/analyticsGetMetricByScope.ts +190 -0
- package/src/funcs/analyticsGetMyPercentiles.ts +190 -0
- package/src/funcs/analyticsGetTrend.ts +188 -0
- package/src/funcs/analyticsListMetrics.ts +165 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/analyticsbin.ts +41 -0
- package/src/models/components/analyticsbivariate.ts +45 -0
- package/src/models/components/analyticsbivariatebucket.ts +41 -0
- package/src/models/components/analyticsdistribution.ts +48 -0
- package/src/models/components/analyticsdomainentry.ts +43 -0
- package/src/models/components/analyticsgetbivariaterequestbody.ts +84 -0
- package/src/models/components/analyticsgetdistributionrequestbody.ts +59 -0
- package/src/models/components/analyticsgetmetricbyscoperequestbody.ts +91 -0
- package/src/models/components/analyticsgetmypercentilesrequestbody.ts +47 -0
- package/src/models/components/analyticsgettrendrequestbody.ts +86 -0
- package/src/models/components/analyticslistmetricsresponsebody.ts +45 -0
- package/src/models/components/analyticsmetricbyscope.ts +45 -0
- package/src/models/components/analyticsmetricentry.ts +35 -0
- package/src/models/components/analyticsmypercentiles.ts +47 -0
- package/src/models/components/analyticspercentile.ts +35 -0
- package/src/models/components/analyticsscopebucket.ts +54 -0
- package/src/models/components/analyticsscopeentry.ts +40 -0
- package/src/models/components/analyticssummary.ts +43 -0
- package/src/models/components/analyticstrend.ts +45 -0
- package/src/models/components/analyticstrendpoint.ts +39 -0
- package/src/models/components/index.ts +20 -0
- package/src/models/operations/analyticsgetbivariate.ts +43 -0
- package/src/models/operations/analyticsgetdistribution.ts +44 -0
- package/src/models/operations/analyticsgetmetricbyscope.ts +44 -0
- package/src/models/operations/analyticsgetmypercentiles.ts +44 -0
- package/src/models/operations/analyticsgettrend.ts +43 -0
- package/src/models/operations/analyticslistmetrics.ts +46 -0
- package/src/models/operations/index.ts +6 -0
- package/src/sdk/analytics.ts +89 -0
|
@@ -0,0 +1,48 @@
|
|
|
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 { AnalyticsBin, AnalyticsBin$inboundSchema } from "./analyticsbin.js";
|
|
11
|
+
import {
|
|
12
|
+
AnalyticsSummary,
|
|
13
|
+
AnalyticsSummary$inboundSchema,
|
|
14
|
+
} from "./analyticssummary.js";
|
|
15
|
+
|
|
16
|
+
export type AnalyticsDistribution = {
|
|
17
|
+
/**
|
|
18
|
+
* A URL to the JSON Schema for this object.
|
|
19
|
+
*/
|
|
20
|
+
dollarSchema?: string | undefined;
|
|
21
|
+
bins: Array<AnalyticsBin> | null;
|
|
22
|
+
summary: AnalyticsSummary;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const AnalyticsDistribution$inboundSchema: z.ZodType<
|
|
27
|
+
AnalyticsDistribution,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
$schema: z.string().optional(),
|
|
32
|
+
bins: z.nullable(z.array(AnalyticsBin$inboundSchema)),
|
|
33
|
+
summary: AnalyticsSummary$inboundSchema,
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"$schema": "dollarSchema",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function analyticsDistributionFromJSON(
|
|
41
|
+
jsonString: string,
|
|
42
|
+
): SafeParseResult<AnalyticsDistribution, SDKValidationError> {
|
|
43
|
+
return safeParse(
|
|
44
|
+
jsonString,
|
|
45
|
+
(x) => AnalyticsDistribution$inboundSchema.parse(JSON.parse(x)),
|
|
46
|
+
`Failed to parse 'AnalyticsDistribution' from JSON`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
AnalyticsMetricEntry,
|
|
11
|
+
AnalyticsMetricEntry$inboundSchema,
|
|
12
|
+
} from "./analyticsmetricentry.js";
|
|
13
|
+
import {
|
|
14
|
+
AnalyticsScopeEntry,
|
|
15
|
+
AnalyticsScopeEntry$inboundSchema,
|
|
16
|
+
} from "./analyticsscopeentry.js";
|
|
17
|
+
|
|
18
|
+
export type AnalyticsDomainEntry = {
|
|
19
|
+
id: string;
|
|
20
|
+
metrics: Array<AnalyticsMetricEntry> | null;
|
|
21
|
+
scopes: Array<AnalyticsScopeEntry> | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const AnalyticsDomainEntry$inboundSchema: z.ZodType<
|
|
26
|
+
AnalyticsDomainEntry,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
id: z.string(),
|
|
31
|
+
metrics: z.nullable(z.array(AnalyticsMetricEntry$inboundSchema)),
|
|
32
|
+
scopes: z.nullable(z.array(AnalyticsScopeEntry$inboundSchema)),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export function analyticsDomainEntryFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<AnalyticsDomainEntry, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) => AnalyticsDomainEntry$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
+
`Failed to parse 'AnalyticsDomainEntry' from JSON`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* How to aggregate Y inside each X bucket.
|
|
11
|
+
*/
|
|
12
|
+
export const Agg = {
|
|
13
|
+
Avg: "avg",
|
|
14
|
+
Median: "median",
|
|
15
|
+
Count: "count",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* How to aggregate Y inside each X bucket.
|
|
19
|
+
*/
|
|
20
|
+
export type Agg = ClosedEnum<typeof Agg>;
|
|
21
|
+
|
|
22
|
+
export type AnalyticsGetBivariateRequestBody = {
|
|
23
|
+
/**
|
|
24
|
+
* How to aggregate Y inside each X bucket.
|
|
25
|
+
*/
|
|
26
|
+
agg: Agg;
|
|
27
|
+
domain: string;
|
|
28
|
+
scope: string;
|
|
29
|
+
/**
|
|
30
|
+
* Country name/code or region name. Required for non-global scopes.
|
|
31
|
+
*/
|
|
32
|
+
scopeValue?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Metric ID for the X axis (bucketed).
|
|
35
|
+
*/
|
|
36
|
+
x: string;
|
|
37
|
+
/**
|
|
38
|
+
* Metric ID for the Y axis (aggregated within each X bucket).
|
|
39
|
+
*/
|
|
40
|
+
y: string;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const Agg$outboundSchema: z.ZodNativeEnum<typeof Agg> = z.nativeEnum(
|
|
45
|
+
Agg,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export type AnalyticsGetBivariateRequestBody$Outbound = {
|
|
50
|
+
agg: string;
|
|
51
|
+
domain: string;
|
|
52
|
+
scope: string;
|
|
53
|
+
scope_value?: string | undefined;
|
|
54
|
+
x: string;
|
|
55
|
+
y: string;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const AnalyticsGetBivariateRequestBody$outboundSchema: z.ZodType<
|
|
60
|
+
AnalyticsGetBivariateRequestBody$Outbound,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
AnalyticsGetBivariateRequestBody
|
|
63
|
+
> = z.object({
|
|
64
|
+
agg: Agg$outboundSchema,
|
|
65
|
+
domain: z.string(),
|
|
66
|
+
scope: z.string(),
|
|
67
|
+
scopeValue: z.string().optional(),
|
|
68
|
+
x: z.string(),
|
|
69
|
+
y: z.string(),
|
|
70
|
+
}).transform((v) => {
|
|
71
|
+
return remap$(v, {
|
|
72
|
+
scopeValue: "scope_value",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function analyticsGetBivariateRequestBodyToJSON(
|
|
77
|
+
analyticsGetBivariateRequestBody: AnalyticsGetBivariateRequestBody,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
AnalyticsGetBivariateRequestBody$outboundSchema.parse(
|
|
81
|
+
analyticsGetBivariateRequestBody,
|
|
82
|
+
),
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
|
|
8
|
+
export type AnalyticsGetDistributionRequestBody = {
|
|
9
|
+
/**
|
|
10
|
+
* Analytics domain ID. See analytics.listMetrics.
|
|
11
|
+
*/
|
|
12
|
+
domain: string;
|
|
13
|
+
/**
|
|
14
|
+
* Metric ID within the domain.
|
|
15
|
+
*/
|
|
16
|
+
metric: string;
|
|
17
|
+
/**
|
|
18
|
+
* Scope ID within the domain (global, country, region, …).
|
|
19
|
+
*/
|
|
20
|
+
scope: string;
|
|
21
|
+
/**
|
|
22
|
+
* Scope value — country name or ISO code ("Germany" / "DE"), region name ("Europe"). Required for non-global scopes.
|
|
23
|
+
*/
|
|
24
|
+
scopeValue?: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export type AnalyticsGetDistributionRequestBody$Outbound = {
|
|
29
|
+
domain: string;
|
|
30
|
+
metric: string;
|
|
31
|
+
scope: string;
|
|
32
|
+
scope_value?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @internal */
|
|
36
|
+
export const AnalyticsGetDistributionRequestBody$outboundSchema: z.ZodType<
|
|
37
|
+
AnalyticsGetDistributionRequestBody$Outbound,
|
|
38
|
+
z.ZodTypeDef,
|
|
39
|
+
AnalyticsGetDistributionRequestBody
|
|
40
|
+
> = z.object({
|
|
41
|
+
domain: z.string(),
|
|
42
|
+
metric: z.string(),
|
|
43
|
+
scope: z.string(),
|
|
44
|
+
scopeValue: z.string().optional(),
|
|
45
|
+
}).transform((v) => {
|
|
46
|
+
return remap$(v, {
|
|
47
|
+
scopeValue: "scope_value",
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export function analyticsGetDistributionRequestBodyToJSON(
|
|
52
|
+
analyticsGetDistributionRequestBody: AnalyticsGetDistributionRequestBody,
|
|
53
|
+
): string {
|
|
54
|
+
return JSON.stringify(
|
|
55
|
+
AnalyticsGetDistributionRequestBody$outboundSchema.parse(
|
|
56
|
+
analyticsGetDistributionRequestBody,
|
|
57
|
+
),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Aggregation applied within each dimension bucket.
|
|
10
|
+
*/
|
|
11
|
+
export const AnalyticsGetMetricByScopeRequestBodyAgg = {
|
|
12
|
+
Avg: "avg",
|
|
13
|
+
Median: "median",
|
|
14
|
+
Count: "count",
|
|
15
|
+
} as const;
|
|
16
|
+
/**
|
|
17
|
+
* Aggregation applied within each dimension bucket.
|
|
18
|
+
*/
|
|
19
|
+
export type AnalyticsGetMetricByScopeRequestBodyAgg = ClosedEnum<
|
|
20
|
+
typeof AnalyticsGetMetricByScopeRequestBodyAgg
|
|
21
|
+
>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Group rows by this dimension. One bucket per distinct value.
|
|
25
|
+
*/
|
|
26
|
+
export const Dimension = {
|
|
27
|
+
Country: "country",
|
|
28
|
+
Region: "region",
|
|
29
|
+
} as const;
|
|
30
|
+
/**
|
|
31
|
+
* Group rows by this dimension. One bucket per distinct value.
|
|
32
|
+
*/
|
|
33
|
+
export type Dimension = ClosedEnum<typeof Dimension>;
|
|
34
|
+
|
|
35
|
+
export type AnalyticsGetMetricByScopeRequestBody = {
|
|
36
|
+
/**
|
|
37
|
+
* Aggregation applied within each dimension bucket.
|
|
38
|
+
*/
|
|
39
|
+
agg: AnalyticsGetMetricByScopeRequestBodyAgg;
|
|
40
|
+
/**
|
|
41
|
+
* Group rows by this dimension. One bucket per distinct value.
|
|
42
|
+
*/
|
|
43
|
+
dimension: Dimension;
|
|
44
|
+
/**
|
|
45
|
+
* Analytics domain ID. See analytics.listMetrics.
|
|
46
|
+
*/
|
|
47
|
+
domain: string;
|
|
48
|
+
/**
|
|
49
|
+
* Metric ID within the domain.
|
|
50
|
+
*/
|
|
51
|
+
metric: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/** @internal */
|
|
55
|
+
export const AnalyticsGetMetricByScopeRequestBodyAgg$outboundSchema:
|
|
56
|
+
z.ZodNativeEnum<typeof AnalyticsGetMetricByScopeRequestBodyAgg> = z
|
|
57
|
+
.nativeEnum(AnalyticsGetMetricByScopeRequestBodyAgg);
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const Dimension$outboundSchema: z.ZodNativeEnum<typeof Dimension> = z
|
|
61
|
+
.nativeEnum(Dimension);
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export type AnalyticsGetMetricByScopeRequestBody$Outbound = {
|
|
65
|
+
agg: string;
|
|
66
|
+
dimension: string;
|
|
67
|
+
domain: string;
|
|
68
|
+
metric: string;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const AnalyticsGetMetricByScopeRequestBody$outboundSchema: z.ZodType<
|
|
73
|
+
AnalyticsGetMetricByScopeRequestBody$Outbound,
|
|
74
|
+
z.ZodTypeDef,
|
|
75
|
+
AnalyticsGetMetricByScopeRequestBody
|
|
76
|
+
> = z.object({
|
|
77
|
+
agg: AnalyticsGetMetricByScopeRequestBodyAgg$outboundSchema,
|
|
78
|
+
dimension: Dimension$outboundSchema,
|
|
79
|
+
domain: z.string(),
|
|
80
|
+
metric: z.string(),
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
export function analyticsGetMetricByScopeRequestBodyToJSON(
|
|
84
|
+
analyticsGetMetricByScopeRequestBody: AnalyticsGetMetricByScopeRequestBody,
|
|
85
|
+
): string {
|
|
86
|
+
return JSON.stringify(
|
|
87
|
+
AnalyticsGetMetricByScopeRequestBody$outboundSchema.parse(
|
|
88
|
+
analyticsGetMetricByScopeRequestBody,
|
|
89
|
+
),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
|
|
8
|
+
export type AnalyticsGetMyPercentilesRequestBody = {
|
|
9
|
+
domain: string;
|
|
10
|
+
scope: string;
|
|
11
|
+
/**
|
|
12
|
+
* Country name/code or region name. Required for non-global scopes.
|
|
13
|
+
*/
|
|
14
|
+
scopeValue?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type AnalyticsGetMyPercentilesRequestBody$Outbound = {
|
|
19
|
+
domain: string;
|
|
20
|
+
scope: string;
|
|
21
|
+
scope_value?: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const AnalyticsGetMyPercentilesRequestBody$outboundSchema: z.ZodType<
|
|
26
|
+
AnalyticsGetMyPercentilesRequestBody$Outbound,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
AnalyticsGetMyPercentilesRequestBody
|
|
29
|
+
> = z.object({
|
|
30
|
+
domain: z.string(),
|
|
31
|
+
scope: z.string(),
|
|
32
|
+
scopeValue: z.string().optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
scopeValue: "scope_value",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function analyticsGetMyPercentilesRequestBodyToJSON(
|
|
40
|
+
analyticsGetMyPercentilesRequestBody: AnalyticsGetMyPercentilesRequestBody,
|
|
41
|
+
): string {
|
|
42
|
+
return JSON.stringify(
|
|
43
|
+
AnalyticsGetMyPercentilesRequestBody$outboundSchema.parse(
|
|
44
|
+
analyticsGetMyPercentilesRequestBody,
|
|
45
|
+
),
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
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 { ClosedEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Lookback window.
|
|
11
|
+
*/
|
|
12
|
+
export const AnalyticsGetTrendRequestBodyWindow = {
|
|
13
|
+
Sevend: "7d",
|
|
14
|
+
Thirtyd: "30d",
|
|
15
|
+
Ninetyd: "90d",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* Lookback window.
|
|
19
|
+
*/
|
|
20
|
+
export type AnalyticsGetTrendRequestBodyWindow = ClosedEnum<
|
|
21
|
+
typeof AnalyticsGetTrendRequestBodyWindow
|
|
22
|
+
>;
|
|
23
|
+
|
|
24
|
+
export type AnalyticsGetTrendRequestBody = {
|
|
25
|
+
/**
|
|
26
|
+
* Analytics domain ID.
|
|
27
|
+
*/
|
|
28
|
+
domain: string;
|
|
29
|
+
/**
|
|
30
|
+
* Metric ID within the domain.
|
|
31
|
+
*/
|
|
32
|
+
metric: string;
|
|
33
|
+
/**
|
|
34
|
+
* Scope ID within the domain.
|
|
35
|
+
*/
|
|
36
|
+
scope: string;
|
|
37
|
+
/**
|
|
38
|
+
* Country name/code or region name. Required for non-global scopes.
|
|
39
|
+
*/
|
|
40
|
+
scopeValue?: string | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Lookback window.
|
|
43
|
+
*/
|
|
44
|
+
window: AnalyticsGetTrendRequestBodyWindow;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const AnalyticsGetTrendRequestBodyWindow$outboundSchema: z.ZodNativeEnum<
|
|
49
|
+
typeof AnalyticsGetTrendRequestBodyWindow
|
|
50
|
+
> = z.nativeEnum(AnalyticsGetTrendRequestBodyWindow);
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type AnalyticsGetTrendRequestBody$Outbound = {
|
|
54
|
+
domain: string;
|
|
55
|
+
metric: string;
|
|
56
|
+
scope: string;
|
|
57
|
+
scope_value?: string | undefined;
|
|
58
|
+
window: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const AnalyticsGetTrendRequestBody$outboundSchema: z.ZodType<
|
|
63
|
+
AnalyticsGetTrendRequestBody$Outbound,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
AnalyticsGetTrendRequestBody
|
|
66
|
+
> = z.object({
|
|
67
|
+
domain: z.string(),
|
|
68
|
+
metric: z.string(),
|
|
69
|
+
scope: z.string(),
|
|
70
|
+
scopeValue: z.string().optional(),
|
|
71
|
+
window: AnalyticsGetTrendRequestBodyWindow$outboundSchema,
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
scopeValue: "scope_value",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export function analyticsGetTrendRequestBodyToJSON(
|
|
79
|
+
analyticsGetTrendRequestBody: AnalyticsGetTrendRequestBody,
|
|
80
|
+
): string {
|
|
81
|
+
return JSON.stringify(
|
|
82
|
+
AnalyticsGetTrendRequestBody$outboundSchema.parse(
|
|
83
|
+
analyticsGetTrendRequestBody,
|
|
84
|
+
),
|
|
85
|
+
);
|
|
86
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
AnalyticsDomainEntry,
|
|
12
|
+
AnalyticsDomainEntry$inboundSchema,
|
|
13
|
+
} from "./analyticsdomainentry.js";
|
|
14
|
+
|
|
15
|
+
export type AnalyticsListMetricsResponseBody = {
|
|
16
|
+
/**
|
|
17
|
+
* A URL to the JSON Schema for this object.
|
|
18
|
+
*/
|
|
19
|
+
dollarSchema?: string | undefined;
|
|
20
|
+
domains: Array<AnalyticsDomainEntry> | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const AnalyticsListMetricsResponseBody$inboundSchema: z.ZodType<
|
|
25
|
+
AnalyticsListMetricsResponseBody,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
$schema: z.string().optional(),
|
|
30
|
+
domains: z.nullable(z.array(AnalyticsDomainEntry$inboundSchema)),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"$schema": "dollarSchema",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function analyticsListMetricsResponseBodyFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<AnalyticsListMetricsResponseBody, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => AnalyticsListMetricsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'AnalyticsListMetricsResponseBody' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
AnalyticsScopeBucket,
|
|
12
|
+
AnalyticsScopeBucket$inboundSchema,
|
|
13
|
+
} from "./analyticsscopebucket.js";
|
|
14
|
+
|
|
15
|
+
export type AnalyticsMetricByScope = {
|
|
16
|
+
/**
|
|
17
|
+
* A URL to the JSON Schema for this object.
|
|
18
|
+
*/
|
|
19
|
+
dollarSchema?: string | undefined;
|
|
20
|
+
buckets: Array<AnalyticsScopeBucket> | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const AnalyticsMetricByScope$inboundSchema: z.ZodType<
|
|
25
|
+
AnalyticsMetricByScope,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
$schema: z.string().optional(),
|
|
30
|
+
buckets: z.nullable(z.array(AnalyticsScopeBucket$inboundSchema)),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"$schema": "dollarSchema",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function analyticsMetricByScopeFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<AnalyticsMetricByScope, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => AnalyticsMetricByScope$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'AnalyticsMetricByScope' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type AnalyticsMetricEntry = {
|
|
11
|
+
column: string;
|
|
12
|
+
id: string;
|
|
13
|
+
kind: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const AnalyticsMetricEntry$inboundSchema: z.ZodType<
|
|
18
|
+
AnalyticsMetricEntry,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
column: z.string(),
|
|
23
|
+
id: z.string(),
|
|
24
|
+
kind: z.string(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function analyticsMetricEntryFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<AnalyticsMetricEntry, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => AnalyticsMetricEntry$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'AnalyticsMetricEntry' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
AnalyticsPercentile,
|
|
12
|
+
AnalyticsPercentile$inboundSchema,
|
|
13
|
+
} from "./analyticspercentile.js";
|
|
14
|
+
|
|
15
|
+
export type AnalyticsMyPercentiles = {
|
|
16
|
+
/**
|
|
17
|
+
* A URL to the JSON Schema for this object.
|
|
18
|
+
*/
|
|
19
|
+
dollarSchema?: string | undefined;
|
|
20
|
+
count: number;
|
|
21
|
+
percentiles: Array<AnalyticsPercentile> | null;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const AnalyticsMyPercentiles$inboundSchema: z.ZodType<
|
|
26
|
+
AnalyticsMyPercentiles,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
$schema: z.string().optional(),
|
|
31
|
+
count: z.number().int(),
|
|
32
|
+
percentiles: z.nullable(z.array(AnalyticsPercentile$inboundSchema)),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"$schema": "dollarSchema",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function analyticsMyPercentilesFromJSON(
|
|
40
|
+
jsonString: string,
|
|
41
|
+
): SafeParseResult<AnalyticsMyPercentiles, SDKValidationError> {
|
|
42
|
+
return safeParse(
|
|
43
|
+
jsonString,
|
|
44
|
+
(x) => AnalyticsMyPercentiles$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'AnalyticsMyPercentiles' from JSON`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type AnalyticsPercentile = {
|
|
11
|
+
metric: string;
|
|
12
|
+
percentile: number;
|
|
13
|
+
value: number;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const AnalyticsPercentile$inboundSchema: z.ZodType<
|
|
18
|
+
AnalyticsPercentile,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
metric: z.string(),
|
|
23
|
+
percentile: z.number(),
|
|
24
|
+
value: z.number(),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function analyticsPercentileFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<AnalyticsPercentile, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => AnalyticsPercentile$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'AnalyticsPercentile' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|