@steamsets/client-ts 0.34.4 → 0.34.6

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.
Files changed (199) hide show
  1. package/README.md +15 -0
  2. package/funcs/analyticsGetBivariate.d.ts +16 -0
  3. package/funcs/analyticsGetBivariate.d.ts.map +1 -0
  4. package/funcs/analyticsGetBivariate.js +134 -0
  5. package/funcs/analyticsGetBivariate.js.map +1 -0
  6. package/funcs/analyticsGetDistribution.d.ts +16 -0
  7. package/funcs/analyticsGetDistribution.d.ts.map +1 -0
  8. package/funcs/analyticsGetDistribution.js +134 -0
  9. package/funcs/analyticsGetDistribution.js.map +1 -0
  10. package/funcs/analyticsGetMyPercentiles.d.ts +16 -0
  11. package/funcs/analyticsGetMyPercentiles.d.ts.map +1 -0
  12. package/funcs/analyticsGetMyPercentiles.js +134 -0
  13. package/funcs/analyticsGetMyPercentiles.js.map +1 -0
  14. package/funcs/analyticsGetTrend.d.ts +16 -0
  15. package/funcs/analyticsGetTrend.d.ts.map +1 -0
  16. package/funcs/analyticsGetTrend.js +134 -0
  17. package/funcs/analyticsGetTrend.js.map +1 -0
  18. package/funcs/analyticsListMetrics.d.ts +15 -0
  19. package/funcs/analyticsListMetrics.d.ts.map +1 -0
  20. package/funcs/analyticsListMetrics.js +121 -0
  21. package/funcs/analyticsListMetrics.js.map +1 -0
  22. package/funcs/siteSubscribe.d.ts +20 -0
  23. package/funcs/siteSubscribe.d.ts.map +1 -0
  24. package/funcs/siteSubscribe.js +128 -0
  25. package/funcs/siteSubscribe.js.map +1 -0
  26. package/jsr.json +1 -1
  27. package/lib/config.d.ts +2 -2
  28. package/lib/config.js +2 -2
  29. package/models/components/accountsubscribeheartbeat.d.ts +10 -0
  30. package/models/components/accountsubscribeheartbeat.d.ts.map +1 -0
  31. package/models/components/accountsubscribeheartbeat.js +50 -0
  32. package/models/components/accountsubscribeheartbeat.js.map +1 -0
  33. package/models/components/analyticsbin.d.ts +12 -0
  34. package/models/components/analyticsbin.d.ts.map +1 -0
  35. package/models/components/analyticsbin.js +58 -0
  36. package/models/components/analyticsbin.js.map +1 -0
  37. package/models/components/analyticsbivariate.d.ts +15 -0
  38. package/models/components/analyticsbivariate.d.ts.map +1 -0
  39. package/models/components/analyticsbivariate.js +57 -0
  40. package/models/components/analyticsbivariate.js.map +1 -0
  41. package/models/components/analyticsbivariatebucket.d.ts +12 -0
  42. package/models/components/analyticsbivariatebucket.d.ts.map +1 -0
  43. package/models/components/analyticsbivariatebucket.js +58 -0
  44. package/models/components/analyticsbivariatebucket.js.map +1 -0
  45. package/models/components/analyticsdistribution.d.ts +17 -0
  46. package/models/components/analyticsdistribution.d.ts.map +1 -0
  47. package/models/components/analyticsdistribution.js +59 -0
  48. package/models/components/analyticsdistribution.js.map +1 -0
  49. package/models/components/analyticsdomainentry.d.ts +14 -0
  50. package/models/components/analyticsdomainentry.d.ts.map +1 -0
  51. package/models/components/analyticsdomainentry.js +54 -0
  52. package/models/components/analyticsdomainentry.js.map +1 -0
  53. package/models/components/analyticsgetbivariaterequestbody.d.ts +46 -0
  54. package/models/components/analyticsgetbivariaterequestbody.d.ts.map +1 -0
  55. package/models/components/analyticsgetbivariaterequestbody.js +69 -0
  56. package/models/components/analyticsgetbivariaterequestbody.js.map +1 -0
  57. package/models/components/analyticsgetdistributionrequestbody.d.ts +30 -0
  58. package/models/components/analyticsgetdistributionrequestbody.d.ts.map +1 -0
  59. package/models/components/analyticsgetdistributionrequestbody.js +57 -0
  60. package/models/components/analyticsgetdistributionrequestbody.js.map +1 -0
  61. package/models/components/analyticsgetmypercentilesrequestbody.d.ts +16 -0
  62. package/models/components/analyticsgetmypercentilesrequestbody.d.ts.map +1 -0
  63. package/models/components/analyticsgetmypercentilesrequestbody.js +56 -0
  64. package/models/components/analyticsgetmypercentilesrequestbody.js.map +1 -0
  65. package/models/components/analyticsgettrendrequestbody.d.ts +47 -0
  66. package/models/components/analyticsgettrendrequestbody.d.ts.map +1 -0
  67. package/models/components/analyticsgettrendrequestbody.js +68 -0
  68. package/models/components/analyticsgettrendrequestbody.js.map +1 -0
  69. package/models/components/analyticslistmetricsresponsebody.d.ts +15 -0
  70. package/models/components/analyticslistmetricsresponsebody.d.ts.map +1 -0
  71. package/models/components/analyticslistmetricsresponsebody.js +57 -0
  72. package/models/components/analyticslistmetricsresponsebody.js.map +1 -0
  73. package/models/components/analyticsmetricentry.d.ts +12 -0
  74. package/models/components/analyticsmetricentry.d.ts.map +1 -0
  75. package/models/components/analyticsmetricentry.js +52 -0
  76. package/models/components/analyticsmetricentry.js.map +1 -0
  77. package/models/components/analyticsmypercentiles.d.ts +16 -0
  78. package/models/components/analyticsmypercentiles.d.ts.map +1 -0
  79. package/models/components/analyticsmypercentiles.js +58 -0
  80. package/models/components/analyticsmypercentiles.js.map +1 -0
  81. package/models/components/analyticspercentile.d.ts +12 -0
  82. package/models/components/analyticspercentile.d.ts.map +1 -0
  83. package/models/components/analyticspercentile.js +52 -0
  84. package/models/components/analyticspercentile.js.map +1 -0
  85. package/models/components/analyticsscopeentry.d.ts +12 -0
  86. package/models/components/analyticsscopeentry.d.ts.map +1 -0
  87. package/models/components/analyticsscopeentry.js +57 -0
  88. package/models/components/analyticsscopeentry.js.map +1 -0
  89. package/models/components/analyticssummary.d.ts +16 -0
  90. package/models/components/analyticssummary.d.ts.map +1 -0
  91. package/models/components/analyticssummary.js +56 -0
  92. package/models/components/analyticssummary.js.map +1 -0
  93. package/models/components/analyticstrend.d.ts +15 -0
  94. package/models/components/analyticstrend.d.ts.map +1 -0
  95. package/models/components/analyticstrend.js +57 -0
  96. package/models/components/analyticstrend.js.map +1 -0
  97. package/models/components/analyticstrendpoint.d.ts +14 -0
  98. package/models/components/analyticstrendpoint.d.ts.map +1 -0
  99. package/models/components/analyticstrendpoint.js +54 -0
  100. package/models/components/analyticstrendpoint.js.map +1 -0
  101. package/models/components/index.d.ts +20 -1
  102. package/models/components/index.d.ts.map +1 -1
  103. package/models/components/index.js +20 -1
  104. package/models/components/index.js.map +1 -1
  105. package/models/components/maintenancechanged.d.ts +11 -0
  106. package/models/components/maintenancechanged.d.ts.map +1 -0
  107. package/models/components/maintenancechanged.js +51 -0
  108. package/models/components/maintenancechanged.js.map +1 -0
  109. package/models/components/sitesubscribeheartbeat.d.ts +10 -0
  110. package/models/components/sitesubscribeheartbeat.d.ts.map +1 -0
  111. package/models/components/{heartbeat.js → sitesubscribeheartbeat.js} +6 -6
  112. package/models/components/sitesubscribeheartbeat.js.map +1 -0
  113. package/models/operations/accountsubscribe.d.ts +1 -1
  114. package/models/operations/accountsubscribe.d.ts.map +1 -1
  115. package/models/operations/accountsubscribe.js +1 -1
  116. package/models/operations/accountsubscribe.js.map +1 -1
  117. package/models/operations/analyticsgetbivariate.d.ts +15 -0
  118. package/models/operations/analyticsgetbivariate.d.ts.map +1 -0
  119. package/models/operations/analyticsgetbivariate.js +58 -0
  120. package/models/operations/analyticsgetbivariate.js.map +1 -0
  121. package/models/operations/analyticsgetdistribution.d.ts +15 -0
  122. package/models/operations/analyticsgetdistribution.d.ts.map +1 -0
  123. package/models/operations/analyticsgetdistribution.js +59 -0
  124. package/models/operations/analyticsgetdistribution.js.map +1 -0
  125. package/models/operations/analyticsgetmypercentiles.d.ts +15 -0
  126. package/models/operations/analyticsgetmypercentiles.d.ts.map +1 -0
  127. package/models/operations/analyticsgetmypercentiles.js +59 -0
  128. package/models/operations/analyticsgetmypercentiles.js.map +1 -0
  129. package/models/operations/analyticsgettrend.d.ts +15 -0
  130. package/models/operations/analyticsgettrend.d.ts.map +1 -0
  131. package/models/operations/analyticsgettrend.js +58 -0
  132. package/models/operations/analyticsgettrend.js.map +1 -0
  133. package/models/operations/analyticslistmetrics.d.ts +15 -0
  134. package/models/operations/analyticslistmetrics.d.ts.map +1 -0
  135. package/models/operations/analyticslistmetrics.js +59 -0
  136. package/models/operations/analyticslistmetrics.js.map +1 -0
  137. package/models/operations/index.d.ts +6 -0
  138. package/models/operations/index.d.ts.map +1 -1
  139. package/models/operations/index.js +6 -0
  140. package/models/operations/index.js.map +1 -1
  141. package/models/operations/sitesubscribe.d.ts +63 -0
  142. package/models/operations/sitesubscribe.d.ts.map +1 -0
  143. package/models/operations/sitesubscribe.js +119 -0
  144. package/models/operations/sitesubscribe.js.map +1 -0
  145. package/package.json +1 -1
  146. package/sdk/analytics.d.ts +21 -0
  147. package/sdk/analytics.d.ts.map +1 -1
  148. package/sdk/analytics.js +35 -0
  149. package/sdk/analytics.js.map +1 -1
  150. package/sdk/sdk.d.ts +3 -0
  151. package/sdk/sdk.d.ts.map +1 -1
  152. package/sdk/sdk.js +4 -0
  153. package/sdk/sdk.js.map +1 -1
  154. package/sdk/site.d.ts +13 -0
  155. package/sdk/site.d.ts.map +1 -0
  156. package/sdk/site.js +21 -0
  157. package/sdk/site.js.map +1 -0
  158. package/src/funcs/analyticsGetBivariate.ts +188 -0
  159. package/src/funcs/analyticsGetDistribution.ts +190 -0
  160. package/src/funcs/analyticsGetMyPercentiles.ts +190 -0
  161. package/src/funcs/analyticsGetTrend.ts +188 -0
  162. package/src/funcs/analyticsListMetrics.ts +165 -0
  163. package/src/funcs/siteSubscribe.ts +168 -0
  164. package/src/lib/config.ts +2 -2
  165. package/src/models/components/accountsubscribeheartbeat.ts +31 -0
  166. package/src/models/components/analyticsbin.ts +41 -0
  167. package/src/models/components/analyticsbivariate.ts +45 -0
  168. package/src/models/components/analyticsbivariatebucket.ts +41 -0
  169. package/src/models/components/analyticsdistribution.ts +48 -0
  170. package/src/models/components/analyticsdomainentry.ts +43 -0
  171. package/src/models/components/analyticsgetbivariaterequestbody.ts +81 -0
  172. package/src/models/components/analyticsgetdistributionrequestbody.ts +59 -0
  173. package/src/models/components/analyticsgetmypercentilesrequestbody.ts +44 -0
  174. package/src/models/components/analyticsgettrendrequestbody.ts +83 -0
  175. package/src/models/components/analyticslistmetricsresponsebody.ts +45 -0
  176. package/src/models/components/analyticsmetricentry.ts +35 -0
  177. package/src/models/components/analyticsmypercentiles.ts +47 -0
  178. package/src/models/components/analyticspercentile.ts +35 -0
  179. package/src/models/components/analyticsscopeentry.ts +40 -0
  180. package/src/models/components/analyticssummary.ts +43 -0
  181. package/src/models/components/analyticstrend.ts +45 -0
  182. package/src/models/components/analyticstrendpoint.ts +39 -0
  183. package/src/models/components/index.ts +20 -1
  184. package/src/models/components/maintenancechanged.ts +35 -0
  185. package/src/models/components/{heartbeat.ts → sitesubscribeheartbeat.ts} +7 -7
  186. package/src/models/operations/accountsubscribe.ts +2 -2
  187. package/src/models/operations/analyticsgetbivariate.ts +43 -0
  188. package/src/models/operations/analyticsgetdistribution.ts +44 -0
  189. package/src/models/operations/analyticsgetmypercentiles.ts +44 -0
  190. package/src/models/operations/analyticsgettrend.ts +43 -0
  191. package/src/models/operations/analyticslistmetrics.ts +46 -0
  192. package/src/models/operations/index.ts +6 -0
  193. package/src/models/operations/sitesubscribe.ts +191 -0
  194. package/src/sdk/analytics.ts +74 -0
  195. package/src/sdk/sdk.ts +6 -0
  196. package/src/sdk/site.ts +24 -0
  197. package/models/components/heartbeat.d.ts +0 -10
  198. package/models/components/heartbeat.d.ts.map +0 -1
  199. package/models/components/heartbeat.js.map +0 -1
package/src/lib/config.ts CHANGED
@@ -59,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
59
59
  export const SDK_METADATA = {
60
60
  language: "typescript",
61
61
  openapiDocVersion: "1.0.0",
62
- sdkVersion: "0.34.4",
62
+ sdkVersion: "0.34.6",
63
63
  genVersion: "2.882.0",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.34.4 2.882.0 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.34.6 2.882.0 1.0.0 @steamsets/client-ts",
66
66
  } as const;
@@ -0,0 +1,31 @@
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 AccountSubscribeHeartbeat = {
11
+ heartbeat: number;
12
+ };
13
+
14
+ /** @internal */
15
+ export const AccountSubscribeHeartbeat$inboundSchema: z.ZodType<
16
+ AccountSubscribeHeartbeat,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ heartbeat: z.number().int(),
21
+ });
22
+
23
+ export function accountSubscribeHeartbeatFromJSON(
24
+ jsonString: string,
25
+ ): SafeParseResult<AccountSubscribeHeartbeat, SDKValidationError> {
26
+ return safeParse(
27
+ jsonString,
28
+ (x) => AccountSubscribeHeartbeat$inboundSchema.parse(JSON.parse(x)),
29
+ `Failed to parse 'AccountSubscribeHeartbeat' from JSON`,
30
+ );
31
+ }
@@ -0,0 +1,41 @@
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 AnalyticsBin = {
12
+ count: number;
13
+ xLower: number;
14
+ xUpper: number;
15
+ };
16
+
17
+ /** @internal */
18
+ export const AnalyticsBin$inboundSchema: z.ZodType<
19
+ AnalyticsBin,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ count: z.number(),
24
+ x_lower: z.number(),
25
+ x_upper: z.number(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "x_lower": "xLower",
29
+ "x_upper": "xUpper",
30
+ });
31
+ });
32
+
33
+ export function analyticsBinFromJSON(
34
+ jsonString: string,
35
+ ): SafeParseResult<AnalyticsBin, SDKValidationError> {
36
+ return safeParse(
37
+ jsonString,
38
+ (x) => AnalyticsBin$inboundSchema.parse(JSON.parse(x)),
39
+ `Failed to parse 'AnalyticsBin' from JSON`,
40
+ );
41
+ }
@@ -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
+ AnalyticsBivariateBucket,
12
+ AnalyticsBivariateBucket$inboundSchema,
13
+ } from "./analyticsbivariatebucket.js";
14
+
15
+ export type AnalyticsBivariate = {
16
+ /**
17
+ * A URL to the JSON Schema for this object.
18
+ */
19
+ dollarSchema?: string | undefined;
20
+ buckets: Array<AnalyticsBivariateBucket> | null;
21
+ };
22
+
23
+ /** @internal */
24
+ export const AnalyticsBivariate$inboundSchema: z.ZodType<
25
+ AnalyticsBivariate,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ $schema: z.string().optional(),
30
+ buckets: z.nullable(z.array(AnalyticsBivariateBucket$inboundSchema)),
31
+ }).transform((v) => {
32
+ return remap$(v, {
33
+ "$schema": "dollarSchema",
34
+ });
35
+ });
36
+
37
+ export function analyticsBivariateFromJSON(
38
+ jsonString: string,
39
+ ): SafeParseResult<AnalyticsBivariate, SDKValidationError> {
40
+ return safeParse(
41
+ jsonString,
42
+ (x) => AnalyticsBivariate$inboundSchema.parse(JSON.parse(x)),
43
+ `Failed to parse 'AnalyticsBivariate' from JSON`,
44
+ );
45
+ }
@@ -0,0 +1,41 @@
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 AnalyticsBivariateBucket = {
12
+ count: number;
13
+ xBucket: number;
14
+ yValue: number;
15
+ };
16
+
17
+ /** @internal */
18
+ export const AnalyticsBivariateBucket$inboundSchema: z.ZodType<
19
+ AnalyticsBivariateBucket,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ count: z.number().int(),
24
+ x_bucket: z.number(),
25
+ y_value: z.number(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "x_bucket": "xBucket",
29
+ "y_value": "yValue",
30
+ });
31
+ });
32
+
33
+ export function analyticsBivariateBucketFromJSON(
34
+ jsonString: string,
35
+ ): SafeParseResult<AnalyticsBivariateBucket, SDKValidationError> {
36
+ return safeParse(
37
+ jsonString,
38
+ (x) => AnalyticsBivariateBucket$inboundSchema.parse(JSON.parse(x)),
39
+ `Failed to parse 'AnalyticsBivariateBucket' from JSON`,
40
+ );
41
+ }
@@ -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,81 @@
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
+ scopeValue?: number | undefined;
30
+ /**
31
+ * Metric ID for the X axis (bucketed).
32
+ */
33
+ x: string;
34
+ /**
35
+ * Metric ID for the Y axis (aggregated within each X bucket).
36
+ */
37
+ y: string;
38
+ };
39
+
40
+ /** @internal */
41
+ export const Agg$outboundSchema: z.ZodNativeEnum<typeof Agg> = z.nativeEnum(
42
+ Agg,
43
+ );
44
+
45
+ /** @internal */
46
+ export type AnalyticsGetBivariateRequestBody$Outbound = {
47
+ agg: string;
48
+ domain: string;
49
+ scope: string;
50
+ scope_value?: number | undefined;
51
+ x: string;
52
+ y: string;
53
+ };
54
+
55
+ /** @internal */
56
+ export const AnalyticsGetBivariateRequestBody$outboundSchema: z.ZodType<
57
+ AnalyticsGetBivariateRequestBody$Outbound,
58
+ z.ZodTypeDef,
59
+ AnalyticsGetBivariateRequestBody
60
+ > = z.object({
61
+ agg: Agg$outboundSchema,
62
+ domain: z.string(),
63
+ scope: z.string(),
64
+ scopeValue: z.number().int().optional(),
65
+ x: z.string(),
66
+ y: z.string(),
67
+ }).transform((v) => {
68
+ return remap$(v, {
69
+ scopeValue: "scope_value",
70
+ });
71
+ });
72
+
73
+ export function analyticsGetBivariateRequestBodyToJSON(
74
+ analyticsGetBivariateRequestBody: AnalyticsGetBivariateRequestBody,
75
+ ): string {
76
+ return JSON.stringify(
77
+ AnalyticsGetBivariateRequestBody$outboundSchema.parse(
78
+ analyticsGetBivariateRequestBody,
79
+ ),
80
+ );
81
+ }
@@ -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 (e.g. country_id). Required for non-global scopes.
23
+ */
24
+ scopeValue?: number | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export type AnalyticsGetDistributionRequestBody$Outbound = {
29
+ domain: string;
30
+ metric: string;
31
+ scope: string;
32
+ scope_value?: number | 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.number().int().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,44 @@
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
+ scopeValue?: number | undefined;
12
+ };
13
+
14
+ /** @internal */
15
+ export type AnalyticsGetMyPercentilesRequestBody$Outbound = {
16
+ domain: string;
17
+ scope: string;
18
+ scope_value?: number | undefined;
19
+ };
20
+
21
+ /** @internal */
22
+ export const AnalyticsGetMyPercentilesRequestBody$outboundSchema: z.ZodType<
23
+ AnalyticsGetMyPercentilesRequestBody$Outbound,
24
+ z.ZodTypeDef,
25
+ AnalyticsGetMyPercentilesRequestBody
26
+ > = z.object({
27
+ domain: z.string(),
28
+ scope: z.string(),
29
+ scopeValue: z.number().int().optional(),
30
+ }).transform((v) => {
31
+ return remap$(v, {
32
+ scopeValue: "scope_value",
33
+ });
34
+ });
35
+
36
+ export function analyticsGetMyPercentilesRequestBodyToJSON(
37
+ analyticsGetMyPercentilesRequestBody: AnalyticsGetMyPercentilesRequestBody,
38
+ ): string {
39
+ return JSON.stringify(
40
+ AnalyticsGetMyPercentilesRequestBody$outboundSchema.parse(
41
+ analyticsGetMyPercentilesRequestBody,
42
+ ),
43
+ );
44
+ }
@@ -0,0 +1,83 @@
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
+ scopeValue?: number | undefined;
38
+ /**
39
+ * Lookback window.
40
+ */
41
+ window: AnalyticsGetTrendRequestBodyWindow;
42
+ };
43
+
44
+ /** @internal */
45
+ export const AnalyticsGetTrendRequestBodyWindow$outboundSchema: z.ZodNativeEnum<
46
+ typeof AnalyticsGetTrendRequestBodyWindow
47
+ > = z.nativeEnum(AnalyticsGetTrendRequestBodyWindow);
48
+
49
+ /** @internal */
50
+ export type AnalyticsGetTrendRequestBody$Outbound = {
51
+ domain: string;
52
+ metric: string;
53
+ scope: string;
54
+ scope_value?: number | undefined;
55
+ window: string;
56
+ };
57
+
58
+ /** @internal */
59
+ export const AnalyticsGetTrendRequestBody$outboundSchema: z.ZodType<
60
+ AnalyticsGetTrendRequestBody$Outbound,
61
+ z.ZodTypeDef,
62
+ AnalyticsGetTrendRequestBody
63
+ > = z.object({
64
+ domain: z.string(),
65
+ metric: z.string(),
66
+ scope: z.string(),
67
+ scopeValue: z.number().int().optional(),
68
+ window: AnalyticsGetTrendRequestBodyWindow$outboundSchema,
69
+ }).transform((v) => {
70
+ return remap$(v, {
71
+ scopeValue: "scope_value",
72
+ });
73
+ });
74
+
75
+ export function analyticsGetTrendRequestBodyToJSON(
76
+ analyticsGetTrendRequestBody: AnalyticsGetTrendRequestBody,
77
+ ): string {
78
+ return JSON.stringify(
79
+ AnalyticsGetTrendRequestBody$outboundSchema.parse(
80
+ analyticsGetTrendRequestBody,
81
+ ),
82
+ );
83
+ }
@@ -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,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
+ }