@steamsets/client-ts 0.34.3 → 0.34.5

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 (82) hide show
  1. package/README.md +10 -1
  2. package/funcs/accountSubscribe.d.ts +15 -0
  3. package/funcs/accountSubscribe.d.ts.map +1 -0
  4. package/funcs/accountSubscribe.js +136 -0
  5. package/funcs/accountSubscribe.js.map +1 -0
  6. package/funcs/siteSubscribe.d.ts +20 -0
  7. package/funcs/siteSubscribe.d.ts.map +1 -0
  8. package/funcs/siteSubscribe.js +128 -0
  9. package/funcs/siteSubscribe.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +3 -3
  12. package/lib/config.js +3 -3
  13. package/lib/config.js.map +1 -1
  14. package/models/components/accountsubscribeheartbeat.d.ts +10 -0
  15. package/models/components/accountsubscribeheartbeat.d.ts.map +1 -0
  16. package/models/components/accountsubscribeheartbeat.js +50 -0
  17. package/models/components/accountsubscribeheartbeat.js.map +1 -0
  18. package/models/components/eventaccountupdateddata.d.ts +11 -0
  19. package/models/components/eventaccountupdateddata.d.ts.map +1 -0
  20. package/models/components/eventaccountupdateddata.js +51 -0
  21. package/models/components/eventaccountupdateddata.js.map +1 -0
  22. package/models/components/eventaccountviewtickdata.d.ts +11 -0
  23. package/models/components/eventaccountviewtickdata.d.ts.map +1 -0
  24. package/models/components/eventaccountviewtickdata.js +51 -0
  25. package/models/components/eventaccountviewtickdata.js.map +1 -0
  26. package/models/components/index.d.ts +5 -0
  27. package/models/components/index.d.ts.map +1 -1
  28. package/models/components/index.js +5 -0
  29. package/models/components/index.js.map +1 -1
  30. package/models/components/maintenancechanged.d.ts +11 -0
  31. package/models/components/maintenancechanged.d.ts.map +1 -0
  32. package/models/components/maintenancechanged.js +51 -0
  33. package/models/components/maintenancechanged.js.map +1 -0
  34. package/models/components/sitesubscribeheartbeat.d.ts +10 -0
  35. package/models/components/sitesubscribeheartbeat.d.ts.map +1 -0
  36. package/models/components/sitesubscribeheartbeat.js +50 -0
  37. package/models/components/sitesubscribeheartbeat.js.map +1 -0
  38. package/models/operations/accountsubscribe.d.ts +90 -0
  39. package/models/operations/accountsubscribe.d.ts.map +1 -0
  40. package/models/operations/accountsubscribe.js +146 -0
  41. package/models/operations/accountsubscribe.js.map +1 -0
  42. package/models/operations/badgepricingsubscribe.d.ts +5 -5
  43. package/models/operations/badgepricingsubscribe.d.ts.map +1 -1
  44. package/models/operations/badgepricingsubscribe.js +7 -7
  45. package/models/operations/badgepricingsubscribe.js.map +1 -1
  46. package/models/operations/index.d.ts +2 -0
  47. package/models/operations/index.d.ts.map +1 -1
  48. package/models/operations/index.js +2 -0
  49. package/models/operations/index.js.map +1 -1
  50. package/models/operations/sitesubscribe.d.ts +63 -0
  51. package/models/operations/sitesubscribe.d.ts.map +1 -0
  52. package/models/operations/sitesubscribe.js +119 -0
  53. package/models/operations/sitesubscribe.js.map +1 -0
  54. package/package.json +1 -1
  55. package/sdk/account.d.ts +4 -0
  56. package/sdk/account.d.ts.map +1 -1
  57. package/sdk/account.js +7 -0
  58. package/sdk/account.js.map +1 -1
  59. package/sdk/sdk.d.ts +3 -0
  60. package/sdk/sdk.d.ts.map +1 -1
  61. package/sdk/sdk.js +4 -0
  62. package/sdk/sdk.js.map +1 -1
  63. package/sdk/site.d.ts +13 -0
  64. package/sdk/site.d.ts.map +1 -0
  65. package/sdk/site.js +21 -0
  66. package/sdk/site.js.map +1 -0
  67. package/src/funcs/accountSubscribe.ts +190 -0
  68. package/src/funcs/siteSubscribe.ts +168 -0
  69. package/src/lib/config.ts +3 -3
  70. package/src/models/components/accountsubscribeheartbeat.ts +31 -0
  71. package/src/models/components/eventaccountupdateddata.ts +33 -0
  72. package/src/models/components/eventaccountviewtickdata.ts +33 -0
  73. package/src/models/components/index.ts +5 -0
  74. package/src/models/components/maintenancechanged.ts +35 -0
  75. package/src/models/components/sitesubscribeheartbeat.ts +31 -0
  76. package/src/models/operations/accountsubscribe.ts +251 -0
  77. package/src/models/operations/badgepricingsubscribe.ts +11 -11
  78. package/src/models/operations/index.ts +2 -0
  79. package/src/models/operations/sitesubscribe.ts +191 -0
  80. package/src/sdk/account.ts +15 -0
  81. package/src/sdk/sdk.ts +6 -0
  82. package/src/sdk/site.ts +24 -0
@@ -0,0 +1,190 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { encodeFormQuery } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import { SteamSetsError } from "../models/errors/steamsetserror.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Server-sent-events stream of per-account updates (queue status, view ticks).
31
+ */
32
+ export function accountSubscribe(
33
+ client: SteamSetsCore,
34
+ request: operations.AccountSubscribeRequest,
35
+ options?: RequestOptions,
36
+ ): APIPromise<
37
+ Result<
38
+ operations.AccountSubscribeResponse,
39
+ | errors.ErrorModel
40
+ | SteamSetsError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: SteamSetsCore,
59
+ request: operations.AccountSubscribeRequest,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ operations.AccountSubscribeResponse,
65
+ | errors.ErrorModel
66
+ | SteamSetsError
67
+ | ResponseValidationError
68
+ | ConnectionError
69
+ | RequestAbortedError
70
+ | RequestTimeoutError
71
+ | InvalidRequestError
72
+ | UnexpectedClientError
73
+ | SDKValidationError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) => operations.AccountSubscribeRequest$outboundSchema.parse(value),
81
+ "Input validation failed",
82
+ );
83
+ if (!parsed.ok) {
84
+ return [parsed, { status: "invalid" }];
85
+ }
86
+ const payload = parsed.value;
87
+ const body = null;
88
+
89
+ const path = pathToFunc("/v1/account.subscribe")();
90
+
91
+ const query = encodeFormQuery({
92
+ "accountId": payload.accountId,
93
+ }, { explode: false });
94
+
95
+ const headers = new Headers(compactMap({
96
+ Accept: "text/event-stream",
97
+ }));
98
+
99
+ const secConfig = await extractSecurity(client._options.token);
100
+ const securityInput = secConfig == null ? {} : { token: secConfig };
101
+ const requestSecurity = resolveGlobalSecurity(securityInput);
102
+
103
+ const context = {
104
+ options: client._options,
105
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
106
+ operationID: "account.subscribe",
107
+ oAuth2Scopes: null,
108
+
109
+ resolvedSecurity: requestSecurity,
110
+
111
+ securitySource: client._options.token,
112
+ retryConfig: options?.retries
113
+ || client._options.retryConfig
114
+ || {
115
+ strategy: "backoff",
116
+ backoff: {
117
+ initialInterval: 500,
118
+ maxInterval: 5000,
119
+ exponent: 1.5,
120
+ maxElapsedTime: 60000,
121
+ },
122
+ retryConnectionErrors: true,
123
+ }
124
+ || { strategy: "none" },
125
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
126
+ };
127
+
128
+ const requestRes = client._createRequest(context, {
129
+ security: requestSecurity,
130
+ method: "GET",
131
+ baseURL: options?.serverURL,
132
+ path: path,
133
+ headers: headers,
134
+ query: query,
135
+ body: body,
136
+ uaHeader: "x-speakeasy-user-agent",
137
+ userAgent: client._options.userAgent,
138
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
139
+ }, options);
140
+ if (!requestRes.ok) {
141
+ return [requestRes, { status: "invalid" }];
142
+ }
143
+ const req = requestRes.value;
144
+
145
+ const doResult = await client._do(req, {
146
+ context,
147
+ isErrorStatusCode: (statusCode: number) =>
148
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
149
+ retryConfig: context.retryConfig,
150
+ retryCodes: context.retryCodes,
151
+ });
152
+ if (!doResult.ok) {
153
+ return [doResult, { status: "request-error", request: req }];
154
+ }
155
+ const response = doResult.value;
156
+
157
+ const responseFields = {
158
+ HttpMeta: { Response: response, Request: req },
159
+ };
160
+
161
+ const [result] = await M.match<
162
+ operations.AccountSubscribeResponse,
163
+ | errors.ErrorModel
164
+ | SteamSetsError
165
+ | ResponseValidationError
166
+ | ConnectionError
167
+ | RequestAbortedError
168
+ | RequestTimeoutError
169
+ | InvalidRequestError
170
+ | UnexpectedClientError
171
+ | SDKValidationError
172
+ >(
173
+ M.sse(200, operations.AccountSubscribeResponse$inboundSchema, {
174
+ key: "Server Sent Events",
175
+ }),
176
+ M.jsonErr([400, 401, 403, 404, 422], errors.ErrorModel$inboundSchema, {
177
+ ctype: "application/problem+json",
178
+ }),
179
+ M.jsonErr(500, errors.ErrorModel$inboundSchema, {
180
+ ctype: "application/problem+json",
181
+ }),
182
+ M.fail("4XX"),
183
+ M.fail("5XX"),
184
+ )(response, req, { extraFields: responseFields });
185
+ if (!result.ok) {
186
+ return [result, { status: "complete", request: req, response }];
187
+ }
188
+
189
+ return [result, { status: "complete", request: req, response }];
190
+ }
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import { matchStatusCode } from "../lib/http.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { RequestOptions } from "../lib/sdks.js";
10
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
+ import { pathToFunc } from "../lib/url.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../models/errors/httpclienterrors.js";
19
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import { SteamSetsError } from "../models/errors/steamsetserror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ export enum SubscribeAcceptEnum {
27
+ applicationProblemPlusJson = "application/problem+json",
28
+ textEventStream = "text/event-stream",
29
+ }
30
+
31
+ /**
32
+ * Server-sent-events stream of site-wide broadcasts (maintenance, announcements, etc).
33
+ */
34
+ export function siteSubscribe(
35
+ client: SteamSetsCore,
36
+ options?: RequestOptions & { acceptHeaderOverride?: SubscribeAcceptEnum },
37
+ ): APIPromise<
38
+ Result<
39
+ operations.SiteSubscribeResponse,
40
+ | SteamSetsError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ options,
53
+ ));
54
+ }
55
+
56
+ async function $do(
57
+ client: SteamSetsCore,
58
+ options?: RequestOptions & { acceptHeaderOverride?: SubscribeAcceptEnum },
59
+ ): Promise<
60
+ [
61
+ Result<
62
+ operations.SiteSubscribeResponse,
63
+ | SteamSetsError
64
+ | ResponseValidationError
65
+ | ConnectionError
66
+ | RequestAbortedError
67
+ | RequestTimeoutError
68
+ | InvalidRequestError
69
+ | UnexpectedClientError
70
+ | SDKValidationError
71
+ >,
72
+ APICall,
73
+ ]
74
+ > {
75
+ const path = pathToFunc("/v1/site.subscribe")();
76
+
77
+ const headers = new Headers(compactMap({
78
+ Accept: options?.acceptHeaderOverride
79
+ || "application/problem+json;q=1, text/event-stream;q=0",
80
+ }));
81
+
82
+ const secConfig = await extractSecurity(client._options.token);
83
+ const securityInput = secConfig == null ? {} : { token: secConfig };
84
+ const requestSecurity = resolveGlobalSecurity(securityInput);
85
+
86
+ const context = {
87
+ options: client._options,
88
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
89
+ operationID: "site.subscribe",
90
+ oAuth2Scopes: null,
91
+
92
+ resolvedSecurity: requestSecurity,
93
+
94
+ securitySource: client._options.token,
95
+ retryConfig: options?.retries
96
+ || client._options.retryConfig
97
+ || {
98
+ strategy: "backoff",
99
+ backoff: {
100
+ initialInterval: 500,
101
+ maxInterval: 5000,
102
+ exponent: 1.5,
103
+ maxElapsedTime: 60000,
104
+ },
105
+ retryConnectionErrors: true,
106
+ }
107
+ || { strategy: "none" },
108
+ retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
109
+ };
110
+
111
+ const requestRes = client._createRequest(context, {
112
+ security: requestSecurity,
113
+ method: "GET",
114
+ baseURL: options?.serverURL,
115
+ path: path,
116
+ headers: headers,
117
+ uaHeader: "x-speakeasy-user-agent",
118
+ userAgent: client._options.userAgent,
119
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
120
+ }, options);
121
+ if (!requestRes.ok) {
122
+ return [requestRes, { status: "invalid" }];
123
+ }
124
+ const req = requestRes.value;
125
+
126
+ const doResult = await client._do(req, {
127
+ context,
128
+ isErrorStatusCode: (statusCode: number) =>
129
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
130
+ retryConfig: context.retryConfig,
131
+ retryCodes: context.retryCodes,
132
+ });
133
+ if (!doResult.ok) {
134
+ return [doResult, { status: "request-error", request: req }];
135
+ }
136
+ const response = doResult.value;
137
+
138
+ const responseFields = {
139
+ HttpMeta: { Response: response, Request: req },
140
+ };
141
+
142
+ const [result] = await M.match<
143
+ operations.SiteSubscribeResponse,
144
+ | SteamSetsError
145
+ | ResponseValidationError
146
+ | ConnectionError
147
+ | RequestAbortedError
148
+ | RequestTimeoutError
149
+ | InvalidRequestError
150
+ | UnexpectedClientError
151
+ | SDKValidationError
152
+ >(
153
+ M.sse(200, operations.SiteSubscribeResponse$inboundSchema, {
154
+ key: "Server Sent Events",
155
+ }),
156
+ M.fail("4XX"),
157
+ M.fail("5XX"),
158
+ M.json("default", operations.SiteSubscribeResponse$inboundSchema, {
159
+ ctype: "application/problem+json",
160
+ key: "ErrorModel",
161
+ }),
162
+ )(response, req, { extraFields: responseFields });
163
+ if (!result.ok) {
164
+ return [result, { status: "complete", request: req, response }];
165
+ }
166
+
167
+ return [result, { status: "complete", request: req, response }];
168
+ }
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.3",
63
- genVersion: "2.881.17",
62
+ sdkVersion: "0.34.5",
63
+ genVersion: "2.882.0",
64
64
  userAgent:
65
- "speakeasy-sdk/typescript 0.34.3 2.881.17 1.0.0 @steamsets/client-ts",
65
+ "speakeasy-sdk/typescript 0.34.5 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,33 @@
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 EventAccountUpdatedData = {
11
+ accountId: number;
12
+ status: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export const EventAccountUpdatedData$inboundSchema: z.ZodType<
17
+ EventAccountUpdatedData,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ accountId: z.number().int(),
22
+ status: z.string(),
23
+ });
24
+
25
+ export function eventAccountUpdatedDataFromJSON(
26
+ jsonString: string,
27
+ ): SafeParseResult<EventAccountUpdatedData, SDKValidationError> {
28
+ return safeParse(
29
+ jsonString,
30
+ (x) => EventAccountUpdatedData$inboundSchema.parse(JSON.parse(x)),
31
+ `Failed to parse 'EventAccountUpdatedData' from JSON`,
32
+ );
33
+ }
@@ -0,0 +1,33 @@
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 EventAccountViewTickData = {
11
+ accountId: number;
12
+ totalDelta: number;
13
+ };
14
+
15
+ /** @internal */
16
+ export const EventAccountViewTickData$inboundSchema: z.ZodType<
17
+ EventAccountViewTickData,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ accountId: z.number().int(),
22
+ totalDelta: z.number().int(),
23
+ });
24
+
25
+ export function eventAccountViewTickDataFromJSON(
26
+ jsonString: string,
27
+ ): SafeParseResult<EventAccountViewTickData, SDKValidationError> {
28
+ return safeParse(
29
+ jsonString,
30
+ (x) => EventAccountViewTickData$inboundSchema.parse(JSON.parse(x)),
31
+ `Failed to parse 'EventAccountViewTickData' from JSON`,
32
+ );
33
+ }
@@ -7,6 +7,7 @@ export * from "./accountgettrendingrequestbody.js";
7
7
  export * from "./accountgettrendingresponsebody.js";
8
8
  export * from "./accountleaderboardhistory.js";
9
9
  export * from "./accountsearch.js";
10
+ export * from "./accountsubscribeheartbeat.js";
10
11
  export * from "./accountviewstats.js";
11
12
  export * from "./admincmsitem.js";
12
13
  export * from "./analyticstrackeventrequestbody.js";
@@ -41,6 +42,8 @@ export * from "./developerappanalyticstimeseries.js";
41
42
  export * from "./developerappanalyticstimeseriespoint.js";
42
43
  export * from "./errordetail.js";
43
44
  export * from "./errormodel.js";
45
+ export * from "./eventaccountupdateddata.js";
46
+ export * from "./eventaccountviewtickdata.js";
44
47
  export * from "./eventmarketpricetickdata.js";
45
48
  export * from "./eventstatsheartbeatdata.js";
46
49
  export * from "./eventstatsupdateddata.js";
@@ -64,6 +67,7 @@ export * from "./leaderboardstate.js";
64
67
  export * from "./listallresponsebody.js";
65
68
  export * from "./listresponsebody.js";
66
69
  export * from "./loginrequestbody.js";
70
+ export * from "./maintenancechanged.js";
67
71
  export * from "./maintenanceevent.js";
68
72
  export * from "./order.js";
69
73
  export * from "./owner.js";
@@ -82,6 +86,7 @@ export * from "./security.js";
82
86
  export * from "./session.js";
83
87
  export * from "./setremovecolortag.js";
84
88
  export * from "./setremovedesigntag.js";
89
+ export * from "./sitesubscribeheartbeat.js";
85
90
  export * from "./state.js";
86
91
  export * from "./trendingaccount.js";
87
92
  export * from "./trendingsearch.js";
@@ -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
+ import {
10
+ MaintenanceEvent,
11
+ MaintenanceEvent$inboundSchema,
12
+ } from "./maintenanceevent.js";
13
+
14
+ export type MaintenanceChanged = {
15
+ items: Array<MaintenanceEvent | null> | null;
16
+ };
17
+
18
+ /** @internal */
19
+ export const MaintenanceChanged$inboundSchema: z.ZodType<
20
+ MaintenanceChanged,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ items: z.nullable(z.array(z.nullable(MaintenanceEvent$inboundSchema))),
25
+ });
26
+
27
+ export function maintenanceChangedFromJSON(
28
+ jsonString: string,
29
+ ): SafeParseResult<MaintenanceChanged, SDKValidationError> {
30
+ return safeParse(
31
+ jsonString,
32
+ (x) => MaintenanceChanged$inboundSchema.parse(JSON.parse(x)),
33
+ `Failed to parse 'MaintenanceChanged' from JSON`,
34
+ );
35
+ }
@@ -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 SiteSubscribeHeartbeat = {
11
+ heartbeat: number;
12
+ };
13
+
14
+ /** @internal */
15
+ export const SiteSubscribeHeartbeat$inboundSchema: z.ZodType<
16
+ SiteSubscribeHeartbeat,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ heartbeat: z.number().int(),
21
+ });
22
+
23
+ export function siteSubscribeHeartbeatFromJSON(
24
+ jsonString: string,
25
+ ): SafeParseResult<SiteSubscribeHeartbeat, SDKValidationError> {
26
+ return safeParse(
27
+ jsonString,
28
+ (x) => SiteSubscribeHeartbeat$inboundSchema.parse(JSON.parse(x)),
29
+ `Failed to parse 'SiteSubscribeHeartbeat' from JSON`,
30
+ );
31
+ }