@steamsets/client-ts 0.13.4 → 0.13.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 +36 -26
- package/docs/sdks/account/README.md +72 -0
- package/docs/sdks/admin/README.md +159 -0
- package/docs/sdks/badge/README.md +150 -0
- package/funcs/accountAccountV1GetBadgeBookmarks.d.ts +11 -0
- package/funcs/accountAccountV1GetBadgeBookmarks.d.ts.map +1 -0
- package/funcs/accountAccountV1GetBadgeBookmarks.js +99 -0
- package/funcs/accountAccountV1GetBadgeBookmarks.js.map +1 -0
- package/funcs/adminAdminV1GetEvents.d.ts +10 -0
- package/funcs/adminAdminV1GetEvents.d.ts.map +1 -0
- package/funcs/adminAdminV1GetEvents.js +98 -0
- package/funcs/adminAdminV1GetEvents.js.map +1 -0
- package/funcs/adminAdminV1UpdateEvent.d.ts +11 -0
- package/funcs/adminAdminV1UpdateEvent.d.ts.map +1 -0
- package/funcs/adminAdminV1UpdateEvent.js +109 -0
- package/funcs/adminAdminV1UpdateEvent.js.map +1 -0
- package/funcs/badgeAccountV1BookmarkBadge.d.ts +11 -0
- package/funcs/badgeAccountV1BookmarkBadge.d.ts.map +1 -0
- package/funcs/badgeAccountV1BookmarkBadge.js +109 -0
- package/funcs/badgeAccountV1BookmarkBadge.js.map +1 -0
- package/funcs/badgeAccountV1GetBadgeBookmarks.d.ts +11 -0
- package/funcs/badgeAccountV1GetBadgeBookmarks.d.ts.map +1 -0
- package/funcs/badgeAccountV1GetBadgeBookmarks.js +99 -0
- package/funcs/badgeAccountV1GetBadgeBookmarks.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +11 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +11 -0
- package/models/components/index.js.map +1 -1
- package/models/components/v1accountbadgebookmark.d.ts +37 -0
- package/models/components/v1accountbadgebookmark.d.ts.map +1 -0
- package/models/components/v1accountbadgebookmark.js +61 -0
- package/models/components/v1accountbadgebookmark.js.map +1 -0
- package/models/components/v1accountbadgebookmarkrequestbody.d.ts +37 -0
- package/models/components/v1accountbadgebookmarkrequestbody.d.ts.map +1 -0
- package/models/components/v1accountbadgebookmarkrequestbody.js +61 -0
- package/models/components/v1accountbadgebookmarkrequestbody.js.map +1 -0
- package/models/components/v1accountbadgebookmarkresponsebody.d.ts +32 -0
- package/models/components/v1accountbadgebookmarkresponsebody.d.ts.map +1 -0
- package/models/components/v1accountbadgebookmarkresponsebody.js +68 -0
- package/models/components/v1accountbadgebookmarkresponsebody.js.map +1 -0
- package/models/components/v1accountbadgebookmarksrequestbody.d.ts +25 -0
- package/models/components/v1accountbadgebookmarksrequestbody.d.ts.map +1 -0
- package/models/components/v1accountbadgebookmarksrequestbody.js +55 -0
- package/models/components/v1accountbadgebookmarksrequestbody.js.map +1 -0
- package/models/components/v1accountbadgebookmarksresponsebody.d.ts +35 -0
- package/models/components/v1accountbadgebookmarksresponsebody.d.ts.map +1 -0
- package/models/components/v1accountbadgebookmarksresponsebody.js +71 -0
- package/models/components/v1accountbadgebookmarksresponsebody.js.map +1 -0
- package/models/components/v1admingeteventsresponsebody.d.ts +35 -0
- package/models/components/v1admingeteventsresponsebody.d.ts.map +1 -0
- package/models/components/v1admingeteventsresponsebody.js +71 -0
- package/models/components/v1admingeteventsresponsebody.js.map +1 -0
- package/models/components/v1adminupdateeventrequestbody.d.ts +38 -0
- package/models/components/v1adminupdateeventrequestbody.d.ts.map +1 -0
- package/models/components/v1adminupdateeventrequestbody.js +62 -0
- package/models/components/v1adminupdateeventrequestbody.js.map +1 -0
- package/models/components/v1adminupdateeventresponsebody.d.ts +32 -0
- package/models/components/v1adminupdateeventresponsebody.d.ts.map +1 -0
- package/models/components/v1adminupdateeventresponsebody.js +68 -0
- package/models/components/v1adminupdateeventresponsebody.js.map +1 -0
- package/models/components/v1appeventmapping.d.ts +37 -0
- package/models/components/v1appeventmapping.d.ts.map +1 -0
- package/models/components/v1appeventmapping.js +61 -0
- package/models/components/v1appeventmapping.js.map +1 -0
- package/models/components/v1event.d.ts +88 -0
- package/models/components/v1event.d.ts.map +1 -0
- package/models/components/v1event.js +82 -0
- package/models/components/v1event.js.map +1 -0
- package/models/components/v1getsessionbody.d.ts +10 -0
- package/models/components/v1getsessionbody.d.ts.map +1 -1
- package/models/components/v1getsessionbody.js +4 -0
- package/models/components/v1getsessionbody.js.map +1 -1
- package/models/components/v1leaderboardbadge.d.ts +3 -0
- package/models/components/v1leaderboardbadge.d.ts.map +1 -1
- package/models/components/v1leaderboardbadge.js +3 -0
- package/models/components/v1leaderboardbadge.js.map +1 -1
- package/models/components/v1leaderboardbadgeevent.d.ts +77 -0
- package/models/components/v1leaderboardbadgeevent.d.ts.map +1 -0
- package/models/components/v1leaderboardbadgeevent.js +77 -0
- package/models/components/v1leaderboardbadgeevent.js.map +1 -0
- package/models/operations/accountv1bookmarkbadge.d.ts +35 -0
- package/models/operations/accountv1bookmarkbadge.d.ts.map +1 -0
- package/models/operations/accountv1bookmarkbadge.js +75 -0
- package/models/operations/accountv1bookmarkbadge.js.map +1 -0
- package/models/operations/accountv1getbadgebookmarks.d.ts +35 -0
- package/models/operations/accountv1getbadgebookmarks.d.ts.map +1 -0
- package/models/operations/accountv1getbadgebookmarks.js +75 -0
- package/models/operations/accountv1getbadgebookmarks.js.map +1 -0
- package/models/operations/adminv1getevents.d.ts +35 -0
- package/models/operations/adminv1getevents.d.ts.map +1 -0
- package/models/operations/adminv1getevents.js +75 -0
- package/models/operations/adminv1getevents.js.map +1 -0
- package/models/operations/adminv1updateevent.d.ts +35 -0
- package/models/operations/adminv1updateevent.d.ts.map +1 -0
- package/models/operations/adminv1updateevent.js +75 -0
- package/models/operations/adminv1updateevent.js.map +1 -0
- package/models/operations/index.d.ts +4 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/account.d.ts +1 -0
- package/sdk/account.d.ts.map +1 -1
- package/sdk/account.js +4 -0
- package/sdk/account.js.map +1 -1
- package/sdk/admin.d.ts +2 -0
- package/sdk/admin.d.ts.map +1 -1
- package/sdk/admin.js +8 -0
- package/sdk/admin.js.map +1 -1
- package/sdk/badge.d.ts +2 -0
- package/sdk/badge.d.ts.map +1 -1
- package/sdk/badge.js +8 -0
- package/sdk/badge.js.map +1 -1
- package/sdk/sdk.d.ts +2 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -4
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/accountAccountV1GetBadgeBookmarks.ts +127 -0
- package/src/funcs/adminAdminV1GetEvents.ts +124 -0
- package/src/funcs/adminAdminV1UpdateEvent.ts +142 -0
- package/src/funcs/badgeAccountV1BookmarkBadge.ts +142 -0
- package/src/funcs/badgeAccountV1GetBadgeBookmarks.ts +127 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +11 -0
- package/src/models/components/v1accountbadgebookmark.ts +78 -0
- package/src/models/components/v1accountbadgebookmarkrequestbody.ts +79 -0
- package/src/models/components/v1accountbadgebookmarkresponsebody.ts +82 -0
- package/src/models/components/v1accountbadgebookmarksrequestbody.ts +62 -0
- package/src/models/components/v1accountbadgebookmarksresponsebody.ts +93 -0
- package/src/models/components/v1admingeteventsresponsebody.ts +90 -0
- package/src/models/components/v1adminupdateeventrequestbody.ts +84 -0
- package/src/models/components/v1adminupdateeventresponsebody.ts +80 -0
- package/src/models/components/v1appeventmapping.ts +76 -0
- package/src/models/components/v1event.ts +145 -0
- package/src/models/components/v1getsessionbody.ts +14 -0
- package/src/models/components/v1leaderboardbadge.ts +10 -0
- package/src/models/components/v1leaderboardbadgeevent.ts +132 -0
- package/src/models/operations/accountv1bookmarkbadge.ts +93 -0
- package/src/models/operations/accountv1getbadgebookmarks.ts +96 -0
- package/src/models/operations/adminv1getevents.ts +91 -0
- package/src/models/operations/adminv1updateevent.ts +91 -0
- package/src/models/operations/index.ts +4 -0
- package/src/sdk/account.ts +12 -0
- package/src/sdk/admin.ts +22 -0
- package/src/sdk/badge.ts +24 -0
- package/src/sdk/sdk.ts +5 -5
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
* The gid of the event
|
|
31
|
+
*/
|
|
32
|
+
gid: string;
|
|
33
|
+
/**
|
|
34
|
+
* The header image of the event
|
|
35
|
+
*/
|
|
36
|
+
headerImage: string;
|
|
37
|
+
/**
|
|
38
|
+
* The mappings of the event
|
|
39
|
+
*/
|
|
40
|
+
mappings: Array<V1AppEventMapping> | null;
|
|
41
|
+
/**
|
|
42
|
+
* The name of the event
|
|
43
|
+
*/
|
|
44
|
+
name: string;
|
|
45
|
+
/**
|
|
46
|
+
* The time the event was posted
|
|
47
|
+
*/
|
|
48
|
+
postedAt: Date;
|
|
49
|
+
/**
|
|
50
|
+
* Use this ID to make any changes to the event
|
|
51
|
+
*/
|
|
52
|
+
publicId: string;
|
|
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
|
+
gid: z.string(),
|
|
74
|
+
headerImage: z.string(),
|
|
75
|
+
mappings: z.nullable(z.array(V1AppEventMapping$inboundSchema)),
|
|
76
|
+
name: z.string(),
|
|
77
|
+
postedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
78
|
+
publicId: z.string(),
|
|
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
|
+
gid: string;
|
|
90
|
+
headerImage: string;
|
|
91
|
+
mappings: Array<V1AppEventMapping$Outbound> | null;
|
|
92
|
+
name: string;
|
|
93
|
+
postedAt: string;
|
|
94
|
+
publicId: 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
|
+
gid: z.string(),
|
|
110
|
+
headerImage: z.string(),
|
|
111
|
+
mappings: z.nullable(z.array(V1AppEventMapping$outboundSchema)),
|
|
112
|
+
name: z.string(),
|
|
113
|
+
postedAt: z.date().transform(v => v.toISOString()),
|
|
114
|
+
publicId: z.string(),
|
|
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
|
+
}
|
|
@@ -35,6 +35,14 @@ export type V1GetSessionBody = {
|
|
|
35
35
|
* The account id
|
|
36
36
|
*/
|
|
37
37
|
accountId: number;
|
|
38
|
+
/**
|
|
39
|
+
* The avatar of the account
|
|
40
|
+
*/
|
|
41
|
+
avatar: string;
|
|
42
|
+
/**
|
|
43
|
+
* The name of the accountt
|
|
44
|
+
*/
|
|
45
|
+
name: string;
|
|
38
46
|
/**
|
|
39
47
|
* The resources the user has (permissions)
|
|
40
48
|
*/
|
|
@@ -58,6 +66,8 @@ export const V1GetSessionBody$inboundSchema: z.ZodType<
|
|
|
58
66
|
> = z.object({
|
|
59
67
|
$schema: z.string().optional(),
|
|
60
68
|
accountId: z.number().int(),
|
|
69
|
+
avatar: z.string(),
|
|
70
|
+
name: z.string(),
|
|
61
71
|
resources: z.nullable(z.array(Resource$inboundSchema)),
|
|
62
72
|
roles: z.nullable(z.array(Role$inboundSchema)),
|
|
63
73
|
sessionData: Session$inboundSchema,
|
|
@@ -72,6 +82,8 @@ export const V1GetSessionBody$inboundSchema: z.ZodType<
|
|
|
72
82
|
export type V1GetSessionBody$Outbound = {
|
|
73
83
|
$schema?: string | undefined;
|
|
74
84
|
accountId: number;
|
|
85
|
+
avatar: string;
|
|
86
|
+
name: string;
|
|
75
87
|
resources: Array<Resource$Outbound> | null;
|
|
76
88
|
roles: Array<Role$Outbound> | null;
|
|
77
89
|
sessionData: Session$Outbound;
|
|
@@ -86,6 +98,8 @@ export const V1GetSessionBody$outboundSchema: z.ZodType<
|
|
|
86
98
|
> = z.object({
|
|
87
99
|
dollarSchema: z.string().optional(),
|
|
88
100
|
accountId: z.number().int(),
|
|
101
|
+
avatar: z.string(),
|
|
102
|
+
name: z.string(),
|
|
89
103
|
resources: z.nullable(z.array(Resource$outboundSchema)),
|
|
90
104
|
roles: z.nullable(z.array(Role$outboundSchema)),
|
|
91
105
|
sessionData: Session$outboundSchema,
|
|
@@ -6,6 +6,12 @@ import * as z from "zod";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
V1LeaderboardBadgeEvent,
|
|
11
|
+
V1LeaderboardBadgeEvent$inboundSchema,
|
|
12
|
+
V1LeaderboardBadgeEvent$Outbound,
|
|
13
|
+
V1LeaderboardBadgeEvent$outboundSchema,
|
|
14
|
+
} from "./v1leaderboardbadgeevent.js";
|
|
9
15
|
|
|
10
16
|
export type V1LeaderboardBadge = {
|
|
11
17
|
/**
|
|
@@ -20,6 +26,7 @@ export type V1LeaderboardBadge = {
|
|
|
20
26
|
* The name of the app
|
|
21
27
|
*/
|
|
22
28
|
appName: string;
|
|
29
|
+
event?: V1LeaderboardBadgeEvent | null | undefined;
|
|
23
30
|
/**
|
|
24
31
|
* The time the badge was completed
|
|
25
32
|
*/
|
|
@@ -87,6 +94,7 @@ export const V1LeaderboardBadge$inboundSchema: z.ZodType<
|
|
|
87
94
|
appId: z.number().int(),
|
|
88
95
|
appImage: z.string(),
|
|
89
96
|
appName: z.string(),
|
|
97
|
+
event: z.nullable(V1LeaderboardBadgeEvent$inboundSchema).optional(),
|
|
90
98
|
firstCompletion: z.nullable(
|
|
91
99
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
92
100
|
),
|
|
@@ -112,6 +120,7 @@ export type V1LeaderboardBadge$Outbound = {
|
|
|
112
120
|
appId: number;
|
|
113
121
|
appImage: string;
|
|
114
122
|
appName: string;
|
|
123
|
+
event?: V1LeaderboardBadgeEvent$Outbound | null | undefined;
|
|
115
124
|
firstCompletion: string | null;
|
|
116
125
|
highestLevel: number | null;
|
|
117
126
|
image: string;
|
|
@@ -137,6 +146,7 @@ export const V1LeaderboardBadge$outboundSchema: z.ZodType<
|
|
|
137
146
|
appId: z.number().int(),
|
|
138
147
|
appImage: z.string(),
|
|
139
148
|
appName: z.string(),
|
|
149
|
+
event: z.nullable(V1LeaderboardBadgeEvent$outboundSchema).optional(),
|
|
140
150
|
firstCompletion: z.nullable(z.date().transform(v => v.toISOString())),
|
|
141
151
|
highestLevel: z.nullable(z.number().int()),
|
|
142
152
|
image: z.string(),
|
|
@@ -0,0 +1,132 @@
|
|
|
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 V1LeaderboardBadgeEvent = {
|
|
11
|
+
/**
|
|
12
|
+
* The body image of the event
|
|
13
|
+
*/
|
|
14
|
+
bodyImage: string;
|
|
15
|
+
/**
|
|
16
|
+
* The number of downvotes the event has
|
|
17
|
+
*/
|
|
18
|
+
downvotes: number;
|
|
19
|
+
/**
|
|
20
|
+
* The time the event ends
|
|
21
|
+
*/
|
|
22
|
+
endsAt: Date;
|
|
23
|
+
/**
|
|
24
|
+
* The gid of the event
|
|
25
|
+
*/
|
|
26
|
+
gid: string;
|
|
27
|
+
/**
|
|
28
|
+
* The header image of the event
|
|
29
|
+
*/
|
|
30
|
+
headerImage: string;
|
|
31
|
+
/**
|
|
32
|
+
* The name of the event
|
|
33
|
+
*/
|
|
34
|
+
name: string;
|
|
35
|
+
/**
|
|
36
|
+
* The time the event was posted
|
|
37
|
+
*/
|
|
38
|
+
postedAt: Date;
|
|
39
|
+
/**
|
|
40
|
+
* The time the event starts
|
|
41
|
+
*/
|
|
42
|
+
startsAt: Date;
|
|
43
|
+
/**
|
|
44
|
+
* The title of the event
|
|
45
|
+
*/
|
|
46
|
+
title: string;
|
|
47
|
+
/**
|
|
48
|
+
* The number of upvotes the event has
|
|
49
|
+
*/
|
|
50
|
+
upvotes: number;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const V1LeaderboardBadgeEvent$inboundSchema: z.ZodType<
|
|
55
|
+
V1LeaderboardBadgeEvent,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
unknown
|
|
58
|
+
> = z.object({
|
|
59
|
+
bodyImage: z.string(),
|
|
60
|
+
downvotes: z.number().int(),
|
|
61
|
+
endsAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
62
|
+
gid: z.string(),
|
|
63
|
+
headerImage: z.string(),
|
|
64
|
+
name: z.string(),
|
|
65
|
+
postedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
66
|
+
startsAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
67
|
+
title: z.string(),
|
|
68
|
+
upvotes: z.number().int(),
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/** @internal */
|
|
72
|
+
export type V1LeaderboardBadgeEvent$Outbound = {
|
|
73
|
+
bodyImage: string;
|
|
74
|
+
downvotes: number;
|
|
75
|
+
endsAt: string;
|
|
76
|
+
gid: string;
|
|
77
|
+
headerImage: string;
|
|
78
|
+
name: string;
|
|
79
|
+
postedAt: string;
|
|
80
|
+
startsAt: string;
|
|
81
|
+
title: string;
|
|
82
|
+
upvotes: number;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const V1LeaderboardBadgeEvent$outboundSchema: z.ZodType<
|
|
87
|
+
V1LeaderboardBadgeEvent$Outbound,
|
|
88
|
+
z.ZodTypeDef,
|
|
89
|
+
V1LeaderboardBadgeEvent
|
|
90
|
+
> = z.object({
|
|
91
|
+
bodyImage: z.string(),
|
|
92
|
+
downvotes: z.number().int(),
|
|
93
|
+
endsAt: z.date().transform(v => v.toISOString()),
|
|
94
|
+
gid: z.string(),
|
|
95
|
+
headerImage: z.string(),
|
|
96
|
+
name: z.string(),
|
|
97
|
+
postedAt: z.date().transform(v => v.toISOString()),
|
|
98
|
+
startsAt: z.date().transform(v => v.toISOString()),
|
|
99
|
+
title: z.string(),
|
|
100
|
+
upvotes: z.number().int(),
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
106
|
+
*/
|
|
107
|
+
export namespace V1LeaderboardBadgeEvent$ {
|
|
108
|
+
/** @deprecated use `V1LeaderboardBadgeEvent$inboundSchema` instead. */
|
|
109
|
+
export const inboundSchema = V1LeaderboardBadgeEvent$inboundSchema;
|
|
110
|
+
/** @deprecated use `V1LeaderboardBadgeEvent$outboundSchema` instead. */
|
|
111
|
+
export const outboundSchema = V1LeaderboardBadgeEvent$outboundSchema;
|
|
112
|
+
/** @deprecated use `V1LeaderboardBadgeEvent$Outbound` instead. */
|
|
113
|
+
export type Outbound = V1LeaderboardBadgeEvent$Outbound;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function v1LeaderboardBadgeEventToJSON(
|
|
117
|
+
v1LeaderboardBadgeEvent: V1LeaderboardBadgeEvent,
|
|
118
|
+
): string {
|
|
119
|
+
return JSON.stringify(
|
|
120
|
+
V1LeaderboardBadgeEvent$outboundSchema.parse(v1LeaderboardBadgeEvent),
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function v1LeaderboardBadgeEventFromJSON(
|
|
125
|
+
jsonString: string,
|
|
126
|
+
): SafeParseResult<V1LeaderboardBadgeEvent, SDKValidationError> {
|
|
127
|
+
return safeParse(
|
|
128
|
+
jsonString,
|
|
129
|
+
(x) => V1LeaderboardBadgeEvent$inboundSchema.parse(JSON.parse(x)),
|
|
130
|
+
`Failed to parse 'V1LeaderboardBadgeEvent' from JSON`,
|
|
131
|
+
);
|
|
132
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AccountV1BookmarkBadgeResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1AccountBadgeBookmarkResponseBody?:
|
|
18
|
+
| components.V1AccountBadgeBookmarkResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AccountV1BookmarkBadgeResponse$inboundSchema: z.ZodType<
|
|
24
|
+
AccountV1BookmarkBadgeResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
V1AccountBadgeBookmarkResponseBody: components
|
|
30
|
+
.V1AccountBadgeBookmarkResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"V1AccountBadgeBookmarkResponseBody": "v1AccountBadgeBookmarkResponseBody",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type AccountV1BookmarkBadgeResponse$Outbound = {
|
|
40
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
41
|
+
V1AccountBadgeBookmarkResponseBody?:
|
|
42
|
+
| components.V1AccountBadgeBookmarkResponseBody$Outbound
|
|
43
|
+
| undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const AccountV1BookmarkBadgeResponse$outboundSchema: z.ZodType<
|
|
48
|
+
AccountV1BookmarkBadgeResponse$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
AccountV1BookmarkBadgeResponse
|
|
51
|
+
> = z.object({
|
|
52
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
53
|
+
v1AccountBadgeBookmarkResponseBody: components
|
|
54
|
+
.V1AccountBadgeBookmarkResponseBody$outboundSchema.optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
httpMeta: "HttpMeta",
|
|
58
|
+
v1AccountBadgeBookmarkResponseBody: "V1AccountBadgeBookmarkResponseBody",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* @internal
|
|
64
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
|
+
*/
|
|
66
|
+
export namespace AccountV1BookmarkBadgeResponse$ {
|
|
67
|
+
/** @deprecated use `AccountV1BookmarkBadgeResponse$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = AccountV1BookmarkBadgeResponse$inboundSchema;
|
|
69
|
+
/** @deprecated use `AccountV1BookmarkBadgeResponse$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = AccountV1BookmarkBadgeResponse$outboundSchema;
|
|
71
|
+
/** @deprecated use `AccountV1BookmarkBadgeResponse$Outbound` instead. */
|
|
72
|
+
export type Outbound = AccountV1BookmarkBadgeResponse$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function accountV1BookmarkBadgeResponseToJSON(
|
|
76
|
+
accountV1BookmarkBadgeResponse: AccountV1BookmarkBadgeResponse,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
AccountV1BookmarkBadgeResponse$outboundSchema.parse(
|
|
80
|
+
accountV1BookmarkBadgeResponse,
|
|
81
|
+
),
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function accountV1BookmarkBadgeResponseFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<AccountV1BookmarkBadgeResponse, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => AccountV1BookmarkBadgeResponse$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'AccountV1BookmarkBadgeResponse' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type AccountV1GetBadgeBookmarksResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1AccountBadgeBookmarksResponseBody?:
|
|
18
|
+
| components.V1AccountBadgeBookmarksResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AccountV1GetBadgeBookmarksResponse$inboundSchema: z.ZodType<
|
|
24
|
+
AccountV1GetBadgeBookmarksResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
V1AccountBadgeBookmarksResponseBody: components
|
|
30
|
+
.V1AccountBadgeBookmarksResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"V1AccountBadgeBookmarksResponseBody":
|
|
35
|
+
"v1AccountBadgeBookmarksResponseBody",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type AccountV1GetBadgeBookmarksResponse$Outbound = {
|
|
41
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
42
|
+
V1AccountBadgeBookmarksResponseBody?:
|
|
43
|
+
| components.V1AccountBadgeBookmarksResponseBody$Outbound
|
|
44
|
+
| undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const AccountV1GetBadgeBookmarksResponse$outboundSchema: z.ZodType<
|
|
49
|
+
AccountV1GetBadgeBookmarksResponse$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
AccountV1GetBadgeBookmarksResponse
|
|
52
|
+
> = z.object({
|
|
53
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
54
|
+
v1AccountBadgeBookmarksResponseBody: components
|
|
55
|
+
.V1AccountBadgeBookmarksResponseBody$outboundSchema.optional(),
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
httpMeta: "HttpMeta",
|
|
59
|
+
v1AccountBadgeBookmarksResponseBody: "V1AccountBadgeBookmarksResponseBody",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace AccountV1GetBadgeBookmarksResponse$ {
|
|
68
|
+
/** @deprecated use `AccountV1GetBadgeBookmarksResponse$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = AccountV1GetBadgeBookmarksResponse$inboundSchema;
|
|
70
|
+
/** @deprecated use `AccountV1GetBadgeBookmarksResponse$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema =
|
|
72
|
+
AccountV1GetBadgeBookmarksResponse$outboundSchema;
|
|
73
|
+
/** @deprecated use `AccountV1GetBadgeBookmarksResponse$Outbound` instead. */
|
|
74
|
+
export type Outbound = AccountV1GetBadgeBookmarksResponse$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function accountV1GetBadgeBookmarksResponseToJSON(
|
|
78
|
+
accountV1GetBadgeBookmarksResponse: AccountV1GetBadgeBookmarksResponse,
|
|
79
|
+
): string {
|
|
80
|
+
return JSON.stringify(
|
|
81
|
+
AccountV1GetBadgeBookmarksResponse$outboundSchema.parse(
|
|
82
|
+
accountV1GetBadgeBookmarksResponse,
|
|
83
|
+
),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function accountV1GetBadgeBookmarksResponseFromJSON(
|
|
88
|
+
jsonString: string,
|
|
89
|
+
): SafeParseResult<AccountV1GetBadgeBookmarksResponse, SDKValidationError> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) =>
|
|
93
|
+
AccountV1GetBadgeBookmarksResponse$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'AccountV1GetBadgeBookmarksResponse' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|