@steamsets/client-ts 0.13.4 → 0.13.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.
- package/README.md +6 -0
- package/docs/sdks/admin/README.md +75 -5
- package/docs/sdks/badge/README.md +150 -0
- package/funcs/adminAdminV1UpdateEvent.d.ts +10 -0
- package/funcs/adminAdminV1UpdateEvent.d.ts.map +1 -0
- package/funcs/adminAdminV1UpdateEvent.js +98 -0
- package/funcs/adminAdminV1UpdateEvent.js.map +1 -0
- package/funcs/adminGetAccount.d.ts +1 -2
- package/funcs/adminGetAccount.d.ts.map +1 -1
- package/funcs/adminGetAccount.js +6 -17
- package/funcs/adminGetAccount.js.map +1 -1
- package/funcs/badgeBadgeV1Bookmark.d.ts +11 -0
- package/funcs/badgeBadgeV1Bookmark.d.ts.map +1 -0
- package/funcs/badgeBadgeV1Bookmark.js +109 -0
- package/funcs/badgeBadgeV1Bookmark.js.map +1 -0
- package/funcs/badgeBadgeV1GetBookmarks.d.ts +11 -0
- package/funcs/badgeBadgeV1GetBookmarks.d.ts.map +1 -0
- package/funcs/badgeBadgeV1GetBookmarks.js +99 -0
- package/funcs/badgeBadgeV1GetBookmarks.js.map +1 -0
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/index.d.ts +9 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +9 -3
- package/models/components/index.js.map +1 -1
- 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/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/v1badgebookmark.d.ts +37 -0
- package/models/components/v1badgebookmark.d.ts.map +1 -0
- package/models/components/{v1accountnameupdate.js → v1badgebookmark.js} +21 -21
- package/models/components/v1badgebookmark.js.map +1 -0
- package/models/components/v1badgebookmarkrequestbody.d.ts +37 -0
- package/models/components/v1badgebookmarkrequestbody.d.ts.map +1 -0
- package/models/components/v1badgebookmarkrequestbody.js +61 -0
- package/models/components/v1badgebookmarkrequestbody.js.map +1 -0
- package/models/components/v1badgebookmarkresponsebody.d.ts +32 -0
- package/models/components/v1badgebookmarkresponsebody.d.ts.map +1 -0
- package/models/components/v1badgebookmarkresponsebody.js +68 -0
- package/models/components/v1badgebookmarkresponsebody.js.map +1 -0
- package/models/components/v1event.d.ts +82 -0
- package/models/components/v1event.d.ts.map +1 -0
- package/models/components/v1event.js +79 -0
- package/models/components/v1event.js.map +1 -0
- package/models/components/v1getbadgebookmarksrequestbody.d.ts +25 -0
- package/models/components/v1getbadgebookmarksrequestbody.d.ts.map +1 -0
- package/models/components/v1getbadgebookmarksrequestbody.js +55 -0
- package/models/components/v1getbadgebookmarksrequestbody.js.map +1 -0
- package/models/components/v1getbadgebookmarksresponsebody.d.ts +35 -0
- package/models/components/v1getbadgebookmarksresponsebody.d.ts.map +1 -0
- package/models/components/v1getbadgebookmarksresponsebody.js +71 -0
- package/models/components/v1getbadgebookmarksresponsebody.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/adminv1getevents.d.ts +35 -0
- package/models/operations/adminv1getevents.d.ts.map +1 -0
- package/models/operations/{adminv1getaccount.js → adminv1getevents.js} +23 -23
- 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/badgev1bookmark.d.ts +35 -0
- package/models/operations/badgev1bookmark.d.ts.map +1 -0
- package/models/operations/badgev1bookmark.js +75 -0
- package/models/operations/badgev1bookmark.js.map +1 -0
- package/models/operations/badgev1getbookmarks.d.ts +35 -0
- package/models/operations/badgev1getbookmarks.d.ts.map +1 -0
- package/models/operations/badgev1getbookmarks.js +75 -0
- package/models/operations/badgev1getbookmarks.js.map +1 -0
- package/models/operations/index.d.ts +4 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/admin.d.ts +2 -1
- package/sdk/admin.d.ts.map +1 -1
- package/sdk/admin.js +6 -2
- 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/src/funcs/adminAdminV1UpdateEvent.ts +124 -0
- package/src/funcs/adminGetAccount.ts +7 -24
- package/src/funcs/badgeBadgeV1Bookmark.ts +142 -0
- package/src/funcs/badgeBadgeV1GetBookmarks.ts +127 -0
- package/src/lib/config.ts +3 -3
- package/src/models/components/index.ts +9 -3
- package/src/models/components/v1admingeteventsresponsebody.ts +90 -0
- package/src/models/components/v1adminupdateeventresponsebody.ts +80 -0
- package/src/models/components/v1badgebookmark.ts +76 -0
- package/src/models/components/v1badgebookmarkrequestbody.ts +76 -0
- package/src/models/components/v1badgebookmarkresponsebody.ts +80 -0
- package/src/models/components/v1event.ts +132 -0
- package/src/models/components/v1getbadgebookmarksrequestbody.ts +60 -0
- package/src/models/components/v1getbadgebookmarksresponsebody.ts +90 -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/adminv1getevents.ts +91 -0
- package/src/models/operations/adminv1updateevent.ts +91 -0
- package/src/models/operations/badgev1bookmark.ts +91 -0
- package/src/models/operations/badgev1getbookmarks.ts +93 -0
- package/src/models/operations/index.ts +4 -1
- package/src/sdk/admin.ts +11 -3
- package/src/sdk/badge.ts +24 -0
- package/models/components/v1accountlocationupdate.d.ts +0 -57
- package/models/components/v1accountlocationupdate.d.ts.map +0 -1
- package/models/components/v1accountlocationupdate.js +0 -69
- package/models/components/v1accountlocationupdate.js.map +0 -1
- package/models/components/v1accountnameupdate.d.ts +0 -37
- package/models/components/v1accountnameupdate.d.ts.map +0 -1
- package/models/components/v1accountnameupdate.js.map +0 -1
- package/models/components/v1admingetaccountresponsebody.d.ts +0 -148
- package/models/components/v1admingetaccountresponsebody.d.ts.map +0 -1
- package/models/components/v1admingetaccountresponsebody.js +0 -127
- package/models/components/v1admingetaccountresponsebody.js.map +0 -1
- package/models/operations/adminv1getaccount.d.ts +0 -35
- package/models/operations/adminv1getaccount.d.ts.map +0 -1
- package/models/operations/adminv1getaccount.js.map +0 -1
- package/src/models/components/v1accountlocationupdate.ts +0 -104
- package/src/models/components/v1accountnameupdate.ts +0 -76
- package/src/models/components/v1admingetaccountresponsebody.ts +0 -261
- package/src/models/operations/adminv1getaccount.ts +0 -91
|
@@ -0,0 +1,80 @@
|
|
|
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 V1BadgeBookmarkResponseBody = {
|
|
12
|
+
/**
|
|
13
|
+
* A URL to the JSON Schema for this object.
|
|
14
|
+
*/
|
|
15
|
+
dollarSchema?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const V1BadgeBookmarkResponseBody$inboundSchema: z.ZodType<
|
|
20
|
+
V1BadgeBookmarkResponseBody,
|
|
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 V1BadgeBookmarkResponseBody$Outbound = {
|
|
33
|
+
$schema?: string | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const V1BadgeBookmarkResponseBody$outboundSchema: z.ZodType<
|
|
38
|
+
V1BadgeBookmarkResponseBody$Outbound,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
V1BadgeBookmarkResponseBody
|
|
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 V1BadgeBookmarkResponseBody$ {
|
|
54
|
+
/** @deprecated use `V1BadgeBookmarkResponseBody$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = V1BadgeBookmarkResponseBody$inboundSchema;
|
|
56
|
+
/** @deprecated use `V1BadgeBookmarkResponseBody$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = V1BadgeBookmarkResponseBody$outboundSchema;
|
|
58
|
+
/** @deprecated use `V1BadgeBookmarkResponseBody$Outbound` instead. */
|
|
59
|
+
export type Outbound = V1BadgeBookmarkResponseBody$Outbound;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function v1BadgeBookmarkResponseBodyToJSON(
|
|
63
|
+
v1BadgeBookmarkResponseBody: V1BadgeBookmarkResponseBody,
|
|
64
|
+
): string {
|
|
65
|
+
return JSON.stringify(
|
|
66
|
+
V1BadgeBookmarkResponseBody$outboundSchema.parse(
|
|
67
|
+
v1BadgeBookmarkResponseBody,
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function v1BadgeBookmarkResponseBodyFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<V1BadgeBookmarkResponseBody, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => V1BadgeBookmarkResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'V1BadgeBookmarkResponseBody' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -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 V1Event = {
|
|
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 end time of the event
|
|
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
|
+
* Use this ID to make any changes to the event
|
|
41
|
+
*/
|
|
42
|
+
publicId: string;
|
|
43
|
+
/**
|
|
44
|
+
* The start time of the event
|
|
45
|
+
*/
|
|
46
|
+
startsAt: Date;
|
|
47
|
+
/**
|
|
48
|
+
* The title of the event
|
|
49
|
+
*/
|
|
50
|
+
title: string;
|
|
51
|
+
/**
|
|
52
|
+
* The number of upvotes the event has
|
|
53
|
+
*/
|
|
54
|
+
upvotes: number;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const V1Event$inboundSchema: z.ZodType<V1Event, z.ZodTypeDef, unknown> =
|
|
59
|
+
z.object({
|
|
60
|
+
bodyImage: z.string(),
|
|
61
|
+
downvotes: z.number().int(),
|
|
62
|
+
endsAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
63
|
+
gid: z.string(),
|
|
64
|
+
headerImage: z.string(),
|
|
65
|
+
name: z.string(),
|
|
66
|
+
postedAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
67
|
+
publicId: z.string(),
|
|
68
|
+
startsAt: z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
69
|
+
title: z.string(),
|
|
70
|
+
upvotes: z.number().int(),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type V1Event$Outbound = {
|
|
75
|
+
bodyImage: string;
|
|
76
|
+
downvotes: number;
|
|
77
|
+
endsAt: string;
|
|
78
|
+
gid: string;
|
|
79
|
+
headerImage: string;
|
|
80
|
+
name: string;
|
|
81
|
+
postedAt: string;
|
|
82
|
+
publicId: string;
|
|
83
|
+
startsAt: string;
|
|
84
|
+
title: string;
|
|
85
|
+
upvotes: number;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const V1Event$outboundSchema: z.ZodType<
|
|
90
|
+
V1Event$Outbound,
|
|
91
|
+
z.ZodTypeDef,
|
|
92
|
+
V1Event
|
|
93
|
+
> = z.object({
|
|
94
|
+
bodyImage: z.string(),
|
|
95
|
+
downvotes: z.number().int(),
|
|
96
|
+
endsAt: z.date().transform(v => v.toISOString()),
|
|
97
|
+
gid: z.string(),
|
|
98
|
+
headerImage: z.string(),
|
|
99
|
+
name: z.string(),
|
|
100
|
+
postedAt: z.date().transform(v => v.toISOString()),
|
|
101
|
+
publicId: z.string(),
|
|
102
|
+
startsAt: z.date().transform(v => v.toISOString()),
|
|
103
|
+
title: z.string(),
|
|
104
|
+
upvotes: z.number().int(),
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @internal
|
|
109
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
110
|
+
*/
|
|
111
|
+
export namespace V1Event$ {
|
|
112
|
+
/** @deprecated use `V1Event$inboundSchema` instead. */
|
|
113
|
+
export const inboundSchema = V1Event$inboundSchema;
|
|
114
|
+
/** @deprecated use `V1Event$outboundSchema` instead. */
|
|
115
|
+
export const outboundSchema = V1Event$outboundSchema;
|
|
116
|
+
/** @deprecated use `V1Event$Outbound` instead. */
|
|
117
|
+
export type Outbound = V1Event$Outbound;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function v1EventToJSON(v1Event: V1Event): string {
|
|
121
|
+
return JSON.stringify(V1Event$outboundSchema.parse(v1Event));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function v1EventFromJSON(
|
|
125
|
+
jsonString: string,
|
|
126
|
+
): SafeParseResult<V1Event, SDKValidationError> {
|
|
127
|
+
return safeParse(
|
|
128
|
+
jsonString,
|
|
129
|
+
(x) => V1Event$inboundSchema.parse(JSON.parse(x)),
|
|
130
|
+
`Failed to parse 'V1Event' from JSON`,
|
|
131
|
+
);
|
|
132
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 V1GetBadgeBookmarksRequestBody = {};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const V1GetBadgeBookmarksRequestBody$inboundSchema: z.ZodType<
|
|
14
|
+
V1GetBadgeBookmarksRequestBody,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.object({});
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type V1GetBadgeBookmarksRequestBody$Outbound = {};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const V1GetBadgeBookmarksRequestBody$outboundSchema: z.ZodType<
|
|
24
|
+
V1GetBadgeBookmarksRequestBody$Outbound,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
V1GetBadgeBookmarksRequestBody
|
|
27
|
+
> = z.object({});
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @internal
|
|
31
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
32
|
+
*/
|
|
33
|
+
export namespace V1GetBadgeBookmarksRequestBody$ {
|
|
34
|
+
/** @deprecated use `V1GetBadgeBookmarksRequestBody$inboundSchema` instead. */
|
|
35
|
+
export const inboundSchema = V1GetBadgeBookmarksRequestBody$inboundSchema;
|
|
36
|
+
/** @deprecated use `V1GetBadgeBookmarksRequestBody$outboundSchema` instead. */
|
|
37
|
+
export const outboundSchema = V1GetBadgeBookmarksRequestBody$outboundSchema;
|
|
38
|
+
/** @deprecated use `V1GetBadgeBookmarksRequestBody$Outbound` instead. */
|
|
39
|
+
export type Outbound = V1GetBadgeBookmarksRequestBody$Outbound;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function v1GetBadgeBookmarksRequestBodyToJSON(
|
|
43
|
+
v1GetBadgeBookmarksRequestBody: V1GetBadgeBookmarksRequestBody,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
V1GetBadgeBookmarksRequestBody$outboundSchema.parse(
|
|
47
|
+
v1GetBadgeBookmarksRequestBody,
|
|
48
|
+
),
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function v1GetBadgeBookmarksRequestBodyFromJSON(
|
|
53
|
+
jsonString: string,
|
|
54
|
+
): SafeParseResult<V1GetBadgeBookmarksRequestBody, SDKValidationError> {
|
|
55
|
+
return safeParse(
|
|
56
|
+
jsonString,
|
|
57
|
+
(x) => V1GetBadgeBookmarksRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
58
|
+
`Failed to parse 'V1GetBadgeBookmarksRequestBody' from JSON`,
|
|
59
|
+
);
|
|
60
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
V1BadgeBookmark,
|
|
12
|
+
V1BadgeBookmark$inboundSchema,
|
|
13
|
+
V1BadgeBookmark$Outbound,
|
|
14
|
+
V1BadgeBookmark$outboundSchema,
|
|
15
|
+
} from "./v1badgebookmark.js";
|
|
16
|
+
|
|
17
|
+
export type V1GetBadgeBookmarksResponseBody = {
|
|
18
|
+
/**
|
|
19
|
+
* A URL to the JSON Schema for this object.
|
|
20
|
+
*/
|
|
21
|
+
dollarSchema?: string | undefined;
|
|
22
|
+
bookmarks: Array<V1BadgeBookmark> | null;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const V1GetBadgeBookmarksResponseBody$inboundSchema: z.ZodType<
|
|
27
|
+
V1GetBadgeBookmarksResponseBody,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.object({
|
|
31
|
+
$schema: z.string().optional(),
|
|
32
|
+
bookmarks: z.nullable(z.array(V1BadgeBookmark$inboundSchema)),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"$schema": "dollarSchema",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type V1GetBadgeBookmarksResponseBody$Outbound = {
|
|
41
|
+
$schema?: string | undefined;
|
|
42
|
+
bookmarks: Array<V1BadgeBookmark$Outbound> | null;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const V1GetBadgeBookmarksResponseBody$outboundSchema: z.ZodType<
|
|
47
|
+
V1GetBadgeBookmarksResponseBody$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
V1GetBadgeBookmarksResponseBody
|
|
50
|
+
> = z.object({
|
|
51
|
+
dollarSchema: z.string().optional(),
|
|
52
|
+
bookmarks: z.nullable(z.array(V1BadgeBookmark$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 V1GetBadgeBookmarksResponseBody$ {
|
|
64
|
+
/** @deprecated use `V1GetBadgeBookmarksResponseBody$inboundSchema` instead. */
|
|
65
|
+
export const inboundSchema = V1GetBadgeBookmarksResponseBody$inboundSchema;
|
|
66
|
+
/** @deprecated use `V1GetBadgeBookmarksResponseBody$outboundSchema` instead. */
|
|
67
|
+
export const outboundSchema = V1GetBadgeBookmarksResponseBody$outboundSchema;
|
|
68
|
+
/** @deprecated use `V1GetBadgeBookmarksResponseBody$Outbound` instead. */
|
|
69
|
+
export type Outbound = V1GetBadgeBookmarksResponseBody$Outbound;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function v1GetBadgeBookmarksResponseBodyToJSON(
|
|
73
|
+
v1GetBadgeBookmarksResponseBody: V1GetBadgeBookmarksResponseBody,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
V1GetBadgeBookmarksResponseBody$outboundSchema.parse(
|
|
77
|
+
v1GetBadgeBookmarksResponseBody,
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function v1GetBadgeBookmarksResponseBodyFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<V1GetBadgeBookmarksResponseBody, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) => V1GetBadgeBookmarksResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
88
|
+
`Failed to parse 'V1GetBadgeBookmarksResponseBody' from JSON`,
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -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,91 @@
|
|
|
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 AdminV1GetEventsResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
v1AdminGetEventsResponseBody?:
|
|
18
|
+
| components.V1AdminGetEventsResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const AdminV1GetEventsResponse$inboundSchema: z.ZodType<
|
|
24
|
+
AdminV1GetEventsResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
V1AdminGetEventsResponseBody: components
|
|
30
|
+
.V1AdminGetEventsResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"V1AdminGetEventsResponseBody": "v1AdminGetEventsResponseBody",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type AdminV1GetEventsResponse$Outbound = {
|
|
40
|
+
HttpMeta: components.HTTPMetadata$Outbound;
|
|
41
|
+
V1AdminGetEventsResponseBody?:
|
|
42
|
+
| components.V1AdminGetEventsResponseBody$Outbound
|
|
43
|
+
| undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const AdminV1GetEventsResponse$outboundSchema: z.ZodType<
|
|
48
|
+
AdminV1GetEventsResponse$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
AdminV1GetEventsResponse
|
|
51
|
+
> = z.object({
|
|
52
|
+
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
53
|
+
v1AdminGetEventsResponseBody: components
|
|
54
|
+
.V1AdminGetEventsResponseBody$outboundSchema.optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
httpMeta: "HttpMeta",
|
|
58
|
+
v1AdminGetEventsResponseBody: "V1AdminGetEventsResponseBody",
|
|
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 AdminV1GetEventsResponse$ {
|
|
67
|
+
/** @deprecated use `AdminV1GetEventsResponse$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = AdminV1GetEventsResponse$inboundSchema;
|
|
69
|
+
/** @deprecated use `AdminV1GetEventsResponse$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = AdminV1GetEventsResponse$outboundSchema;
|
|
71
|
+
/** @deprecated use `AdminV1GetEventsResponse$Outbound` instead. */
|
|
72
|
+
export type Outbound = AdminV1GetEventsResponse$Outbound;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function adminV1GetEventsResponseToJSON(
|
|
76
|
+
adminV1GetEventsResponse: AdminV1GetEventsResponse,
|
|
77
|
+
): string {
|
|
78
|
+
return JSON.stringify(
|
|
79
|
+
AdminV1GetEventsResponse$outboundSchema.parse(adminV1GetEventsResponse),
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function adminV1GetEventsResponseFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<AdminV1GetEventsResponse, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => AdminV1GetEventsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'AdminV1GetEventsResponse' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|