@steamsets/client-ts 0.22.15 → 0.22.16
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 +0 -7
- package/docs/sdks/account/README.md +8 -2
- package/docs/sdks/admin/README.md +4 -91
- package/docs/sdks/app/README.md +2 -2
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/models/components/index.d.ts +0 -6
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -6
- package/models/components/index.js.map +1 -1
- package/models/components/v1leaderboardbadge.d.ts +0 -3
- package/models/components/v1leaderboardbadge.d.ts.map +1 -1
- package/models/components/v1leaderboardbadge.js +0 -3
- package/models/components/v1leaderboardbadge.js.map +1 -1
- package/models/operations/index.d.ts +0 -2
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -2
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/admin.d.ts +0 -4
- package/sdk/admin.d.ts.map +1 -1
- package/sdk/admin.js +0 -8
- package/sdk/admin.js.map +1 -1
- package/sdk/location.d.ts +6 -0
- package/sdk/location.d.ts.map +1 -1
- package/sdk/location.js +6 -0
- package/sdk/location.js.map +1 -1
- package/sdk/stats.d.ts +6 -0
- package/sdk/stats.d.ts.map +1 -1
- package/sdk/stats.js +6 -0
- package/sdk/stats.js.map +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +0 -6
- package/src/models/components/v1leaderboardbadge.ts +0 -10
- package/src/models/operations/index.ts +0 -2
- package/src/sdk/admin.ts +0 -18
- package/src/sdk/location.ts +6 -0
- package/src/sdk/stats.ts +6 -0
- package/docs/sdks/events/README.md +0 -79
- package/funcs/adminEventsGet.d.ts +0 -11
- package/funcs/adminEventsGet.d.ts.map +0 -1
- package/funcs/adminEventsGet.js +0 -107
- package/funcs/adminEventsGet.js.map +0 -1
- package/funcs/adminUpdateEvent.d.ts +0 -12
- package/funcs/adminUpdateEvent.d.ts.map +0 -1
- package/funcs/adminUpdateEvent.js +0 -118
- package/funcs/adminUpdateEvent.js.map +0 -1
- package/models/components/v1admingeteventsresponsebody.d.ts +0 -35
- package/models/components/v1admingeteventsresponsebody.d.ts.map +0 -1
- package/models/components/v1admingeteventsresponsebody.js +0 -71
- package/models/components/v1admingeteventsresponsebody.js.map +0 -1
- package/models/components/v1adminupdateeventrequestbody.d.ts +0 -38
- package/models/components/v1adminupdateeventrequestbody.d.ts.map +0 -1
- package/models/components/v1adminupdateeventrequestbody.js +0 -62
- package/models/components/v1adminupdateeventrequestbody.js.map +0 -1
- package/models/components/v1adminupdateeventresponsebody.d.ts +0 -32
- package/models/components/v1adminupdateeventresponsebody.d.ts.map +0 -1
- package/models/components/v1adminupdateeventresponsebody.js +0 -68
- package/models/components/v1adminupdateeventresponsebody.js.map +0 -1
- package/models/components/v1appeventmapping.d.ts +0 -37
- package/models/components/v1appeventmapping.d.ts.map +0 -1
- package/models/components/v1appeventmapping.js +0 -61
- package/models/components/v1appeventmapping.js.map +0 -1
- package/models/components/v1event.d.ts +0 -88
- package/models/components/v1event.d.ts.map +0 -1
- package/models/components/v1event.js +0 -82
- package/models/components/v1event.js.map +0 -1
- package/models/components/v1leaderboardbadgeevent.d.ts +0 -77
- package/models/components/v1leaderboardbadgeevent.d.ts.map +0 -1
- package/models/components/v1leaderboardbadgeevent.js +0 -77
- package/models/components/v1leaderboardbadgeevent.js.map +0 -1
- package/models/operations/adminv1getevents.d.ts +0 -35
- package/models/operations/adminv1getevents.d.ts.map +0 -1
- package/models/operations/adminv1getevents.js +0 -75
- package/models/operations/adminv1getevents.js.map +0 -1
- package/models/operations/adminv1updateevent.d.ts +0 -35
- package/models/operations/adminv1updateevent.d.ts.map +0 -1
- package/models/operations/adminv1updateevent.js +0 -75
- package/models/operations/adminv1updateevent.js.map +0 -1
- package/sdk/events.d.ts +0 -6
- package/sdk/events.d.ts.map +0 -1
- package/sdk/events.js +0 -16
- package/sdk/events.js.map +0 -1
- package/src/funcs/adminEventsGet.ts +0 -160
- package/src/funcs/adminUpdateEvent.ts +0 -180
- package/src/models/components/v1admingeteventsresponsebody.ts +0 -90
- package/src/models/components/v1adminupdateeventrequestbody.ts +0 -84
- package/src/models/components/v1adminupdateeventresponsebody.ts +0 -80
- package/src/models/components/v1appeventmapping.ts +0 -76
- package/src/models/components/v1event.ts +0 -145
- package/src/models/components/v1leaderboardbadgeevent.ts +0 -132
- package/src/models/operations/adminv1getevents.ts +0 -91
- package/src/models/operations/adminv1updateevent.ts +0 -91
- package/src/sdk/events.ts +0 -19
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SteamSetsCore } from "../core.js";
|
|
6
|
-
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import * as components from "../models/components/index.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 { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
-
import * as operations from "../models/operations/index.js";
|
|
25
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
-
import { Result } from "../types/fp.js";
|
|
27
|
-
|
|
28
|
-
export function adminUpdateEvent(
|
|
29
|
-
client: SteamSetsCore,
|
|
30
|
-
request: components.V1AdminUpdateEventRequestBody,
|
|
31
|
-
options?: RequestOptions,
|
|
32
|
-
): APIPromise<
|
|
33
|
-
Result<
|
|
34
|
-
operations.AdminV1UpdateEventResponse,
|
|
35
|
-
| errors.ErrorModel
|
|
36
|
-
| errors.ErrorModel
|
|
37
|
-
| SDKError
|
|
38
|
-
| SDKValidationError
|
|
39
|
-
| UnexpectedClientError
|
|
40
|
-
| InvalidRequestError
|
|
41
|
-
| RequestAbortedError
|
|
42
|
-
| RequestTimeoutError
|
|
43
|
-
| ConnectionError
|
|
44
|
-
>
|
|
45
|
-
> {
|
|
46
|
-
return new APIPromise($do(
|
|
47
|
-
client,
|
|
48
|
-
request,
|
|
49
|
-
options,
|
|
50
|
-
));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async function $do(
|
|
54
|
-
client: SteamSetsCore,
|
|
55
|
-
request: components.V1AdminUpdateEventRequestBody,
|
|
56
|
-
options?: RequestOptions,
|
|
57
|
-
): Promise<
|
|
58
|
-
[
|
|
59
|
-
Result<
|
|
60
|
-
operations.AdminV1UpdateEventResponse,
|
|
61
|
-
| errors.ErrorModel
|
|
62
|
-
| errors.ErrorModel
|
|
63
|
-
| SDKError
|
|
64
|
-
| SDKValidationError
|
|
65
|
-
| UnexpectedClientError
|
|
66
|
-
| InvalidRequestError
|
|
67
|
-
| RequestAbortedError
|
|
68
|
-
| RequestTimeoutError
|
|
69
|
-
| ConnectionError
|
|
70
|
-
>,
|
|
71
|
-
APICall,
|
|
72
|
-
]
|
|
73
|
-
> {
|
|
74
|
-
const parsed = safeParse(
|
|
75
|
-
request,
|
|
76
|
-
(value) =>
|
|
77
|
-
components.V1AdminUpdateEventRequestBody$outboundSchema.parse(value),
|
|
78
|
-
"Input validation failed",
|
|
79
|
-
);
|
|
80
|
-
if (!parsed.ok) {
|
|
81
|
-
return [parsed, { status: "invalid" }];
|
|
82
|
-
}
|
|
83
|
-
const payload = parsed.value;
|
|
84
|
-
const body = encodeJSON("body", payload, { explode: true });
|
|
85
|
-
|
|
86
|
-
const path = pathToFunc("/admin.v1.AdminService/UpdateEvent")();
|
|
87
|
-
|
|
88
|
-
const headers = new Headers(compactMap({
|
|
89
|
-
"Content-Type": "application/json",
|
|
90
|
-
Accept: "application/json",
|
|
91
|
-
}));
|
|
92
|
-
|
|
93
|
-
const secConfig = await extractSecurity(client._options.token);
|
|
94
|
-
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
95
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
96
|
-
|
|
97
|
-
const context = {
|
|
98
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
99
|
-
operationID: "admin.v1.update-event",
|
|
100
|
-
oAuth2Scopes: [],
|
|
101
|
-
|
|
102
|
-
resolvedSecurity: requestSecurity,
|
|
103
|
-
|
|
104
|
-
securitySource: client._options.token,
|
|
105
|
-
retryConfig: options?.retries
|
|
106
|
-
|| client._options.retryConfig
|
|
107
|
-
|| {
|
|
108
|
-
strategy: "backoff",
|
|
109
|
-
backoff: {
|
|
110
|
-
initialInterval: 500,
|
|
111
|
-
maxInterval: 5000,
|
|
112
|
-
exponent: 1.5,
|
|
113
|
-
maxElapsedTime: 60000,
|
|
114
|
-
},
|
|
115
|
-
retryConnectionErrors: true,
|
|
116
|
-
}
|
|
117
|
-
|| { strategy: "none" },
|
|
118
|
-
retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
const requestRes = client._createRequest(context, {
|
|
122
|
-
security: requestSecurity,
|
|
123
|
-
method: "POST",
|
|
124
|
-
baseURL: options?.serverURL,
|
|
125
|
-
path: path,
|
|
126
|
-
headers: headers,
|
|
127
|
-
body: body,
|
|
128
|
-
uaHeader: "x-speakeasy-user-agent",
|
|
129
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
130
|
-
}, options);
|
|
131
|
-
if (!requestRes.ok) {
|
|
132
|
-
return [requestRes, { status: "invalid" }];
|
|
133
|
-
}
|
|
134
|
-
const req = requestRes.value;
|
|
135
|
-
|
|
136
|
-
const doResult = await client._do(req, {
|
|
137
|
-
context,
|
|
138
|
-
errorCodes: ["403", "404", "422", "429", "4XX", "500", "5XX"],
|
|
139
|
-
retryConfig: context.retryConfig,
|
|
140
|
-
retryCodes: context.retryCodes,
|
|
141
|
-
});
|
|
142
|
-
if (!doResult.ok) {
|
|
143
|
-
return [doResult, { status: "request-error", request: req }];
|
|
144
|
-
}
|
|
145
|
-
const response = doResult.value;
|
|
146
|
-
|
|
147
|
-
const responseFields = {
|
|
148
|
-
HttpMeta: { Response: response, Request: req },
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
const [result] = await M.match<
|
|
152
|
-
operations.AdminV1UpdateEventResponse,
|
|
153
|
-
| errors.ErrorModel
|
|
154
|
-
| errors.ErrorModel
|
|
155
|
-
| SDKError
|
|
156
|
-
| SDKValidationError
|
|
157
|
-
| UnexpectedClientError
|
|
158
|
-
| InvalidRequestError
|
|
159
|
-
| RequestAbortedError
|
|
160
|
-
| RequestTimeoutError
|
|
161
|
-
| ConnectionError
|
|
162
|
-
>(
|
|
163
|
-
M.json(200, operations.AdminV1UpdateEventResponse$inboundSchema, {
|
|
164
|
-
key: "V1AdminUpdateEventResponseBody",
|
|
165
|
-
}),
|
|
166
|
-
M.jsonErr([403, 404, 422, 429], errors.ErrorModel$inboundSchema, {
|
|
167
|
-
ctype: "application/problem+json",
|
|
168
|
-
}),
|
|
169
|
-
M.jsonErr(500, errors.ErrorModel$inboundSchema, {
|
|
170
|
-
ctype: "application/problem+json",
|
|
171
|
-
}),
|
|
172
|
-
M.fail("4XX"),
|
|
173
|
-
M.fail("5XX"),
|
|
174
|
-
)(response, req, { extraFields: responseFields });
|
|
175
|
-
if (!result.ok) {
|
|
176
|
-
return [result, { status: "complete", request: req, response }];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return [result, { status: "complete", request: req, response }];
|
|
180
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
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
|
-
V1Event,
|
|
12
|
-
V1Event$inboundSchema,
|
|
13
|
-
V1Event$Outbound,
|
|
14
|
-
V1Event$outboundSchema,
|
|
15
|
-
} from "./v1event.js";
|
|
16
|
-
|
|
17
|
-
export type V1AdminGetEventsResponseBody = {
|
|
18
|
-
/**
|
|
19
|
-
* A URL to the JSON Schema for this object.
|
|
20
|
-
*/
|
|
21
|
-
dollarSchema?: string | undefined;
|
|
22
|
-
events: Array<V1Event> | null;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/** @internal */
|
|
26
|
-
export const V1AdminGetEventsResponseBody$inboundSchema: z.ZodType<
|
|
27
|
-
V1AdminGetEventsResponseBody,
|
|
28
|
-
z.ZodTypeDef,
|
|
29
|
-
unknown
|
|
30
|
-
> = z.object({
|
|
31
|
-
$schema: z.string().optional(),
|
|
32
|
-
events: z.nullable(z.array(V1Event$inboundSchema)),
|
|
33
|
-
}).transform((v) => {
|
|
34
|
-
return remap$(v, {
|
|
35
|
-
"$schema": "dollarSchema",
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export type V1AdminGetEventsResponseBody$Outbound = {
|
|
41
|
-
$schema?: string | undefined;
|
|
42
|
-
events: Array<V1Event$Outbound> | null;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/** @internal */
|
|
46
|
-
export const V1AdminGetEventsResponseBody$outboundSchema: z.ZodType<
|
|
47
|
-
V1AdminGetEventsResponseBody$Outbound,
|
|
48
|
-
z.ZodTypeDef,
|
|
49
|
-
V1AdminGetEventsResponseBody
|
|
50
|
-
> = z.object({
|
|
51
|
-
dollarSchema: z.string().optional(),
|
|
52
|
-
events: z.nullable(z.array(V1Event$outboundSchema)),
|
|
53
|
-
}).transform((v) => {
|
|
54
|
-
return remap$(v, {
|
|
55
|
-
dollarSchema: "$schema",
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* @internal
|
|
61
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
62
|
-
*/
|
|
63
|
-
export namespace V1AdminGetEventsResponseBody$ {
|
|
64
|
-
/** @deprecated use `V1AdminGetEventsResponseBody$inboundSchema` instead. */
|
|
65
|
-
export const inboundSchema = V1AdminGetEventsResponseBody$inboundSchema;
|
|
66
|
-
/** @deprecated use `V1AdminGetEventsResponseBody$outboundSchema` instead. */
|
|
67
|
-
export const outboundSchema = V1AdminGetEventsResponseBody$outboundSchema;
|
|
68
|
-
/** @deprecated use `V1AdminGetEventsResponseBody$Outbound` instead. */
|
|
69
|
-
export type Outbound = V1AdminGetEventsResponseBody$Outbound;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function v1AdminGetEventsResponseBodyToJSON(
|
|
73
|
-
v1AdminGetEventsResponseBody: V1AdminGetEventsResponseBody,
|
|
74
|
-
): string {
|
|
75
|
-
return JSON.stringify(
|
|
76
|
-
V1AdminGetEventsResponseBody$outboundSchema.parse(
|
|
77
|
-
v1AdminGetEventsResponseBody,
|
|
78
|
-
),
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function v1AdminGetEventsResponseBodyFromJSON(
|
|
83
|
-
jsonString: string,
|
|
84
|
-
): SafeParseResult<V1AdminGetEventsResponseBody, SDKValidationError> {
|
|
85
|
-
return safeParse(
|
|
86
|
-
jsonString,
|
|
87
|
-
(x) => V1AdminGetEventsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
-
`Failed to parse 'V1AdminGetEventsResponseBody' from JSON`,
|
|
89
|
-
);
|
|
90
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
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
|
-
V1AppEventMapping,
|
|
11
|
-
V1AppEventMapping$inboundSchema,
|
|
12
|
-
V1AppEventMapping$Outbound,
|
|
13
|
-
V1AppEventMapping$outboundSchema,
|
|
14
|
-
} from "./v1appeventmapping.js";
|
|
15
|
-
|
|
16
|
-
export type V1AdminUpdateEventRequestBody = {
|
|
17
|
-
/**
|
|
18
|
-
* The event id
|
|
19
|
-
*/
|
|
20
|
-
eventId: string;
|
|
21
|
-
/**
|
|
22
|
-
* The mappings to add
|
|
23
|
-
*/
|
|
24
|
-
mappings: Array<V1AppEventMapping> | null;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** @internal */
|
|
28
|
-
export const V1AdminUpdateEventRequestBody$inboundSchema: z.ZodType<
|
|
29
|
-
V1AdminUpdateEventRequestBody,
|
|
30
|
-
z.ZodTypeDef,
|
|
31
|
-
unknown
|
|
32
|
-
> = z.object({
|
|
33
|
-
eventId: z.string(),
|
|
34
|
-
mappings: z.nullable(z.array(V1AppEventMapping$inboundSchema)),
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
/** @internal */
|
|
38
|
-
export type V1AdminUpdateEventRequestBody$Outbound = {
|
|
39
|
-
eventId: string;
|
|
40
|
-
mappings: Array<V1AppEventMapping$Outbound> | null;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/** @internal */
|
|
44
|
-
export const V1AdminUpdateEventRequestBody$outboundSchema: z.ZodType<
|
|
45
|
-
V1AdminUpdateEventRequestBody$Outbound,
|
|
46
|
-
z.ZodTypeDef,
|
|
47
|
-
V1AdminUpdateEventRequestBody
|
|
48
|
-
> = z.object({
|
|
49
|
-
eventId: z.string(),
|
|
50
|
-
mappings: z.nullable(z.array(V1AppEventMapping$outboundSchema)),
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @internal
|
|
55
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
-
*/
|
|
57
|
-
export namespace V1AdminUpdateEventRequestBody$ {
|
|
58
|
-
/** @deprecated use `V1AdminUpdateEventRequestBody$inboundSchema` instead. */
|
|
59
|
-
export const inboundSchema = V1AdminUpdateEventRequestBody$inboundSchema;
|
|
60
|
-
/** @deprecated use `V1AdminUpdateEventRequestBody$outboundSchema` instead. */
|
|
61
|
-
export const outboundSchema = V1AdminUpdateEventRequestBody$outboundSchema;
|
|
62
|
-
/** @deprecated use `V1AdminUpdateEventRequestBody$Outbound` instead. */
|
|
63
|
-
export type Outbound = V1AdminUpdateEventRequestBody$Outbound;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export function v1AdminUpdateEventRequestBodyToJSON(
|
|
67
|
-
v1AdminUpdateEventRequestBody: V1AdminUpdateEventRequestBody,
|
|
68
|
-
): string {
|
|
69
|
-
return JSON.stringify(
|
|
70
|
-
V1AdminUpdateEventRequestBody$outboundSchema.parse(
|
|
71
|
-
v1AdminUpdateEventRequestBody,
|
|
72
|
-
),
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export function v1AdminUpdateEventRequestBodyFromJSON(
|
|
77
|
-
jsonString: string,
|
|
78
|
-
): SafeParseResult<V1AdminUpdateEventRequestBody, SDKValidationError> {
|
|
79
|
-
return safeParse(
|
|
80
|
-
jsonString,
|
|
81
|
-
(x) => V1AdminUpdateEventRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
-
`Failed to parse 'V1AdminUpdateEventRequestBody' from JSON`,
|
|
83
|
-
);
|
|
84
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
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 V1AdminUpdateEventResponseBody = {
|
|
12
|
-
/**
|
|
13
|
-
* A URL to the JSON Schema for this object.
|
|
14
|
-
*/
|
|
15
|
-
dollarSchema?: string | undefined;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
/** @internal */
|
|
19
|
-
export const V1AdminUpdateEventResponseBody$inboundSchema: z.ZodType<
|
|
20
|
-
V1AdminUpdateEventResponseBody,
|
|
21
|
-
z.ZodTypeDef,
|
|
22
|
-
unknown
|
|
23
|
-
> = z.object({
|
|
24
|
-
$schema: z.string().optional(),
|
|
25
|
-
}).transform((v) => {
|
|
26
|
-
return remap$(v, {
|
|
27
|
-
"$schema": "dollarSchema",
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type V1AdminUpdateEventResponseBody$Outbound = {
|
|
33
|
-
$schema?: string | undefined;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
/** @internal */
|
|
37
|
-
export const V1AdminUpdateEventResponseBody$outboundSchema: z.ZodType<
|
|
38
|
-
V1AdminUpdateEventResponseBody$Outbound,
|
|
39
|
-
z.ZodTypeDef,
|
|
40
|
-
V1AdminUpdateEventResponseBody
|
|
41
|
-
> = z.object({
|
|
42
|
-
dollarSchema: z.string().optional(),
|
|
43
|
-
}).transform((v) => {
|
|
44
|
-
return remap$(v, {
|
|
45
|
-
dollarSchema: "$schema",
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
-
*/
|
|
53
|
-
export namespace V1AdminUpdateEventResponseBody$ {
|
|
54
|
-
/** @deprecated use `V1AdminUpdateEventResponseBody$inboundSchema` instead. */
|
|
55
|
-
export const inboundSchema = V1AdminUpdateEventResponseBody$inboundSchema;
|
|
56
|
-
/** @deprecated use `V1AdminUpdateEventResponseBody$outboundSchema` instead. */
|
|
57
|
-
export const outboundSchema = V1AdminUpdateEventResponseBody$outboundSchema;
|
|
58
|
-
/** @deprecated use `V1AdminUpdateEventResponseBody$Outbound` instead. */
|
|
59
|
-
export type Outbound = V1AdminUpdateEventResponseBody$Outbound;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export function v1AdminUpdateEventResponseBodyToJSON(
|
|
63
|
-
v1AdminUpdateEventResponseBody: V1AdminUpdateEventResponseBody,
|
|
64
|
-
): string {
|
|
65
|
-
return JSON.stringify(
|
|
66
|
-
V1AdminUpdateEventResponseBody$outboundSchema.parse(
|
|
67
|
-
v1AdminUpdateEventResponseBody,
|
|
68
|
-
),
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export function v1AdminUpdateEventResponseBodyFromJSON(
|
|
73
|
-
jsonString: string,
|
|
74
|
-
): SafeParseResult<V1AdminUpdateEventResponseBody, SDKValidationError> {
|
|
75
|
-
return safeParse(
|
|
76
|
-
jsonString,
|
|
77
|
-
(x) => V1AdminUpdateEventResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
-
`Failed to parse 'V1AdminUpdateEventResponseBody' from JSON`,
|
|
79
|
-
);
|
|
80
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
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 V1AppEventMapping = {
|
|
11
|
-
/**
|
|
12
|
-
* The app id
|
|
13
|
-
*/
|
|
14
|
-
appId?: number | null | undefined;
|
|
15
|
-
/**
|
|
16
|
-
* The steam id
|
|
17
|
-
*/
|
|
18
|
-
steamId?: number | null | undefined;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** @internal */
|
|
22
|
-
export const V1AppEventMapping$inboundSchema: z.ZodType<
|
|
23
|
-
V1AppEventMapping,
|
|
24
|
-
z.ZodTypeDef,
|
|
25
|
-
unknown
|
|
26
|
-
> = z.object({
|
|
27
|
-
appId: z.nullable(z.number().int()).optional(),
|
|
28
|
-
steamId: z.nullable(z.number().int()).optional(),
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type V1AppEventMapping$Outbound = {
|
|
33
|
-
appId?: number | null | undefined;
|
|
34
|
-
steamId?: number | null | undefined;
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const V1AppEventMapping$outboundSchema: z.ZodType<
|
|
39
|
-
V1AppEventMapping$Outbound,
|
|
40
|
-
z.ZodTypeDef,
|
|
41
|
-
V1AppEventMapping
|
|
42
|
-
> = z.object({
|
|
43
|
-
appId: z.nullable(z.number().int()).optional(),
|
|
44
|
-
steamId: z.nullable(z.number().int()).optional(),
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @internal
|
|
49
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
-
*/
|
|
51
|
-
export namespace V1AppEventMapping$ {
|
|
52
|
-
/** @deprecated use `V1AppEventMapping$inboundSchema` instead. */
|
|
53
|
-
export const inboundSchema = V1AppEventMapping$inboundSchema;
|
|
54
|
-
/** @deprecated use `V1AppEventMapping$outboundSchema` instead. */
|
|
55
|
-
export const outboundSchema = V1AppEventMapping$outboundSchema;
|
|
56
|
-
/** @deprecated use `V1AppEventMapping$Outbound` instead. */
|
|
57
|
-
export type Outbound = V1AppEventMapping$Outbound;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function v1AppEventMappingToJSON(
|
|
61
|
-
v1AppEventMapping: V1AppEventMapping,
|
|
62
|
-
): string {
|
|
63
|
-
return JSON.stringify(
|
|
64
|
-
V1AppEventMapping$outboundSchema.parse(v1AppEventMapping),
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function v1AppEventMappingFromJSON(
|
|
69
|
-
jsonString: string,
|
|
70
|
-
): SafeParseResult<V1AppEventMapping, SDKValidationError> {
|
|
71
|
-
return safeParse(
|
|
72
|
-
jsonString,
|
|
73
|
-
(x) => V1AppEventMapping$inboundSchema.parse(JSON.parse(x)),
|
|
74
|
-
`Failed to parse 'V1AppEventMapping' from JSON`,
|
|
75
|
-
);
|
|
76
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod";
|
|
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
|
-
V1AppEventMapping,
|
|
11
|
-
V1AppEventMapping$inboundSchema,
|
|
12
|
-
V1AppEventMapping$Outbound,
|
|
13
|
-
V1AppEventMapping$outboundSchema,
|
|
14
|
-
} from "./v1appeventmapping.js";
|
|
15
|
-
|
|
16
|
-
export type V1Event = {
|
|
17
|
-
/**
|
|
18
|
-
* The body image of the event
|
|
19
|
-
*/
|
|
20
|
-
bodyImage: string;
|
|
21
|
-
/**
|
|
22
|
-
* The number of downvotes the event has
|
|
23
|
-
*/
|
|
24
|
-
downvotes: number;
|
|
25
|
-
/**
|
|
26
|
-
* The end time of the event
|
|
27
|
-
*/
|
|
28
|
-
endsAt: Date;
|
|
29
|
-
/**
|
|
30
|
-
* Use this ID to make any changes to the event
|
|
31
|
-
*/
|
|
32
|
-
eventId: string;
|
|
33
|
-
/**
|
|
34
|
-
* The gid of the event
|
|
35
|
-
*/
|
|
36
|
-
gid: string;
|
|
37
|
-
/**
|
|
38
|
-
* The header image of the event
|
|
39
|
-
*/
|
|
40
|
-
headerImage: string;
|
|
41
|
-
/**
|
|
42
|
-
* The mappings of the event
|
|
43
|
-
*/
|
|
44
|
-
mappings: Array<V1AppEventMapping> | null;
|
|
45
|
-
/**
|
|
46
|
-
* The name of the event
|
|
47
|
-
*/
|
|
48
|
-
name: string;
|
|
49
|
-
/**
|
|
50
|
-
* The time the event was posted
|
|
51
|
-
*/
|
|
52
|
-
postedAt: Date;
|
|
53
|
-
/**
|
|
54
|
-
* The start time of the event
|
|
55
|
-
*/
|
|
56
|
-
startsAt: Date;
|
|
57
|
-
/**
|
|
58
|
-
* The title of the event
|
|
59
|
-
*/
|
|
60
|
-
title: string;
|
|
61
|
-
/**
|
|
62
|
-
* The number of upvotes the event has
|
|
63
|
-
*/
|
|
64
|
-
upvotes: number;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
/** @internal */
|
|
68
|
-
export const V1Event$inboundSchema: z.ZodType<V1Event, z.ZodTypeDef, unknown> =
|
|
69
|
-
z.object({
|
|
70
|
-
bodyImage: z.string(),
|
|
71
|
-
downvotes: z.number().int(),
|
|
72
|
-
endsAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
73
|
-
eventId: z.string(),
|
|
74
|
-
gid: z.string(),
|
|
75
|
-
headerImage: z.string(),
|
|
76
|
-
mappings: z.nullable(z.array(V1AppEventMapping$inboundSchema)),
|
|
77
|
-
name: z.string(),
|
|
78
|
-
postedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
79
|
-
startsAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
80
|
-
title: z.string(),
|
|
81
|
-
upvotes: z.number().int(),
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
/** @internal */
|
|
85
|
-
export type V1Event$Outbound = {
|
|
86
|
-
bodyImage: string;
|
|
87
|
-
downvotes: number;
|
|
88
|
-
endsAt: string;
|
|
89
|
-
eventId: string;
|
|
90
|
-
gid: string;
|
|
91
|
-
headerImage: string;
|
|
92
|
-
mappings: Array<V1AppEventMapping$Outbound> | null;
|
|
93
|
-
name: string;
|
|
94
|
-
postedAt: string;
|
|
95
|
-
startsAt: string;
|
|
96
|
-
title: string;
|
|
97
|
-
upvotes: number;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
/** @internal */
|
|
101
|
-
export const V1Event$outboundSchema: z.ZodType<
|
|
102
|
-
V1Event$Outbound,
|
|
103
|
-
z.ZodTypeDef,
|
|
104
|
-
V1Event
|
|
105
|
-
> = z.object({
|
|
106
|
-
bodyImage: z.string(),
|
|
107
|
-
downvotes: z.number().int(),
|
|
108
|
-
endsAt: z.date().transform(v => v.toISOString()),
|
|
109
|
-
eventId: z.string(),
|
|
110
|
-
gid: z.string(),
|
|
111
|
-
headerImage: z.string(),
|
|
112
|
-
mappings: z.nullable(z.array(V1AppEventMapping$outboundSchema)),
|
|
113
|
-
name: z.string(),
|
|
114
|
-
postedAt: z.date().transform(v => v.toISOString()),
|
|
115
|
-
startsAt: z.date().transform(v => v.toISOString()),
|
|
116
|
-
title: z.string(),
|
|
117
|
-
upvotes: z.number().int(),
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* @internal
|
|
122
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
123
|
-
*/
|
|
124
|
-
export namespace V1Event$ {
|
|
125
|
-
/** @deprecated use `V1Event$inboundSchema` instead. */
|
|
126
|
-
export const inboundSchema = V1Event$inboundSchema;
|
|
127
|
-
/** @deprecated use `V1Event$outboundSchema` instead. */
|
|
128
|
-
export const outboundSchema = V1Event$outboundSchema;
|
|
129
|
-
/** @deprecated use `V1Event$Outbound` instead. */
|
|
130
|
-
export type Outbound = V1Event$Outbound;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
export function v1EventToJSON(v1Event: V1Event): string {
|
|
134
|
-
return JSON.stringify(V1Event$outboundSchema.parse(v1Event));
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
export function v1EventFromJSON(
|
|
138
|
-
jsonString: string,
|
|
139
|
-
): SafeParseResult<V1Event, SDKValidationError> {
|
|
140
|
-
return safeParse(
|
|
141
|
-
jsonString,
|
|
142
|
-
(x) => V1Event$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
-
`Failed to parse 'V1Event' from JSON`,
|
|
144
|
-
);
|
|
145
|
-
}
|