@steamsets/client-ts 0.33.2 → 0.33.4
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 +9 -5
- package/funcs/{activityActivityListGlobalFeed.d.ts → activityListGlobalFeed.d.ts} +2 -2
- package/funcs/activityListGlobalFeed.d.ts.map +1 -0
- package/funcs/{activityActivityListGlobalFeed.js → activityListGlobalFeed.js} +5 -5
- package/funcs/activityListGlobalFeed.js.map +1 -0
- package/funcs/{activityActivityStreamGlobalFeed.d.ts → activityStreamGlobalFeed.d.ts} +5 -5
- package/funcs/activityStreamGlobalFeed.d.ts.map +1 -0
- package/funcs/{activityActivityStreamGlobalFeed.js → activityStreamGlobalFeed.js} +15 -12
- package/funcs/activityStreamGlobalFeed.js.map +1 -0
- package/funcs/adminCmsDelete.d.ts +19 -0
- package/funcs/adminCmsDelete.d.ts.map +1 -0
- package/funcs/adminCmsDelete.js +135 -0
- package/funcs/adminCmsDelete.js.map +1 -0
- package/funcs/leaderboardLeaderboardGetChanges.d.ts +16 -0
- package/funcs/leaderboardLeaderboardGetChanges.d.ts.map +1 -0
- package/funcs/leaderboardLeaderboardGetChanges.js +134 -0
- package/funcs/leaderboardLeaderboardGetChanges.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +5 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +5 -0
- package/models/components/index.js.map +1 -1
- package/models/components/leaderboardchange.d.ts +19 -0
- package/models/components/leaderboardchange.d.ts.map +1 -0
- package/models/components/leaderboardchange.js +59 -0
- package/models/components/leaderboardchange.js.map +1 -0
- package/models/components/leaderboardgetchangesrequestbody.d.ts +104 -0
- package/models/components/leaderboardgetchangesrequestbody.d.ts.map +1 -0
- package/models/components/leaderboardgetchangesrequestbody.js +109 -0
- package/models/components/leaderboardgetchangesrequestbody.js.map +1 -0
- package/models/components/leaderboardgetchangesresponsebody.d.ts +15 -0
- package/models/components/leaderboardgetchangesresponsebody.d.ts.map +1 -0
- package/models/components/leaderboardgetchangesresponsebody.js +57 -0
- package/models/components/leaderboardgetchangesresponsebody.js.map +1 -0
- package/models/components/v1activitystreamheartbeat.d.ts +10 -0
- package/models/components/v1activitystreamheartbeat.d.ts.map +1 -0
- package/models/components/v1activitystreamheartbeat.js +50 -0
- package/models/components/v1activitystreamheartbeat.js.map +1 -0
- package/models/components/v1admincmsdeleterequestbody.d.ts +12 -0
- package/models/components/v1admincmsdeleterequestbody.d.ts.map +1 -0
- package/models/components/v1admincmsdeleterequestbody.js +54 -0
- package/models/components/v1admincmsdeleterequestbody.js.map +1 -0
- package/models/operations/cmsdelete.d.ts +11 -0
- package/models/operations/cmsdelete.d.ts.map +1 -0
- package/models/operations/cmsdelete.js +56 -0
- package/models/operations/cmsdelete.js.map +1 -0
- package/models/operations/index.d.ts +4 -2
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +4 -2
- package/models/operations/index.js.map +1 -1
- package/models/operations/leaderboardgetchanges.d.ts +15 -0
- package/models/operations/leaderboardgetchanges.d.ts.map +1 -0
- package/models/operations/leaderboardgetchanges.js +59 -0
- package/models/operations/leaderboardgetchanges.js.map +1 -0
- package/models/operations/{activitylistglobalfeed.d.ts → listglobalfeed.d.ts} +4 -4
- package/models/operations/listglobalfeed.d.ts.map +1 -0
- package/models/operations/{activitylistglobalfeed.js → listglobalfeed.js} +6 -6
- package/models/operations/listglobalfeed.js.map +1 -0
- package/models/operations/streamglobalfeed.d.ts +63 -0
- package/models/operations/streamglobalfeed.d.ts.map +1 -0
- package/models/operations/{activitystreamglobalfeed.js → streamglobalfeed.js} +36 -11
- package/models/operations/streamglobalfeed.js.map +1 -0
- package/package.json +1 -1
- package/sdk/activity.d.ts +6 -6
- package/sdk/activity.d.ts.map +1 -1
- package/sdk/activity.js +9 -9
- package/sdk/activity.js.map +1 -1
- package/sdk/admin.d.ts +7 -0
- package/sdk/admin.d.ts.map +1 -1
- package/sdk/admin.js +10 -0
- package/sdk/admin.js.map +1 -1
- package/sdk/leaderboard.d.ts +4 -0
- package/sdk/leaderboard.d.ts.map +1 -1
- package/sdk/leaderboard.js +7 -0
- package/sdk/leaderboard.js.map +1 -1
- package/src/funcs/{activityActivityListGlobalFeed.ts → activityListGlobalFeed.ts} +6 -6
- package/src/funcs/{activityActivityStreamGlobalFeed.ts → activityStreamGlobalFeed.ts} +13 -14
- package/src/funcs/adminCmsDelete.ts +189 -0
- package/src/funcs/leaderboardLeaderboardGetChanges.ts +188 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +5 -0
- package/src/models/components/leaderboardchange.ts +51 -0
- package/src/models/components/leaderboardgetchangesrequestbody.ts +147 -0
- package/src/models/components/leaderboardgetchangesresponsebody.ts +45 -0
- package/src/models/components/v1activitystreamheartbeat.ts +31 -0
- package/src/models/components/v1admincmsdeleterequestbody.ts +38 -0
- package/src/models/operations/cmsdelete.ts +37 -0
- package/src/models/operations/index.ts +4 -2
- package/src/models/operations/leaderboardgetchanges.ts +46 -0
- package/src/models/operations/{activitylistglobalfeed.ts → listglobalfeed.ts} +7 -7
- package/src/models/operations/{activitystreamglobalfeed.ts → streamglobalfeed.ts} +72 -25
- package/src/sdk/activity.ts +12 -12
- package/src/sdk/admin.ts +18 -0
- package/src/sdk/leaderboard.ts +15 -0
- package/funcs/activityActivityListGlobalFeed.d.ts.map +0 -1
- package/funcs/activityActivityListGlobalFeed.js.map +0 -1
- package/funcs/activityActivityStreamGlobalFeed.d.ts.map +0 -1
- package/funcs/activityActivityStreamGlobalFeed.js.map +0 -1
- package/models/operations/activitylistglobalfeed.d.ts.map +0 -1
- package/models/operations/activitylistglobalfeed.js.map +0 -1
- package/models/operations/activitystreamglobalfeed.d.ts +0 -45
- package/models/operations/activitystreamglobalfeed.d.ts.map +0 -1
- package/models/operations/activitystreamglobalfeed.js.map +0 -1
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* improvements = positive delta, declines = negative delta.
|
|
10
|
+
*/
|
|
11
|
+
export const LeaderboardGetChangesRequestBodyDirection = {
|
|
12
|
+
Improvements: "improvements",
|
|
13
|
+
Declines: "declines",
|
|
14
|
+
} as const;
|
|
15
|
+
/**
|
|
16
|
+
* improvements = positive delta, declines = negative delta.
|
|
17
|
+
*/
|
|
18
|
+
export type LeaderboardGetChangesRequestBodyDirection = ClosedEnum<
|
|
19
|
+
typeof LeaderboardGetChangesRequestBodyDirection
|
|
20
|
+
>;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Which leaderboard the delta is computed against.
|
|
24
|
+
*/
|
|
25
|
+
export const LeaderboardGetChangesRequestBodyLeaderboard = {
|
|
26
|
+
Apps: "apps",
|
|
27
|
+
AwardsGiven: "awards_given",
|
|
28
|
+
AwardsReceived: "awards_received",
|
|
29
|
+
Bans: "bans",
|
|
30
|
+
GameBans: "game_bans",
|
|
31
|
+
VacBans: "vac_bans",
|
|
32
|
+
FoilBadges: "foil_badges",
|
|
33
|
+
NormalBadges: "normal_badges",
|
|
34
|
+
Badges: "badges",
|
|
35
|
+
Playtime: "playtime",
|
|
36
|
+
PointsGiven: "points_given",
|
|
37
|
+
PointsReceived: "points_received",
|
|
38
|
+
SteamSets: "steam_sets",
|
|
39
|
+
Xp: "xp",
|
|
40
|
+
ValidPlaytime: "valid_playtime",
|
|
41
|
+
} as const;
|
|
42
|
+
/**
|
|
43
|
+
* Which leaderboard the delta is computed against.
|
|
44
|
+
*/
|
|
45
|
+
export type LeaderboardGetChangesRequestBodyLeaderboard = ClosedEnum<
|
|
46
|
+
typeof LeaderboardGetChangesRequestBodyLeaderboard
|
|
47
|
+
>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* What to sort by. score = XP/playtime/badges depending on leaderboard. rank = leaderboard position.
|
|
51
|
+
*/
|
|
52
|
+
export const Metric = {
|
|
53
|
+
Score: "score",
|
|
54
|
+
Rank: "rank",
|
|
55
|
+
} as const;
|
|
56
|
+
/**
|
|
57
|
+
* What to sort by. score = XP/playtime/badges depending on leaderboard. rank = leaderboard position.
|
|
58
|
+
*/
|
|
59
|
+
export type Metric = ClosedEnum<typeof Metric>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Lookback window for the delta.
|
|
63
|
+
*/
|
|
64
|
+
export const Window = {
|
|
65
|
+
TwentyFourh: "24h",
|
|
66
|
+
Sevend: "7d",
|
|
67
|
+
Thirtyd: "30d",
|
|
68
|
+
Ninetyd: "90d",
|
|
69
|
+
Oney: "1y",
|
|
70
|
+
} as const;
|
|
71
|
+
/**
|
|
72
|
+
* Lookback window for the delta.
|
|
73
|
+
*/
|
|
74
|
+
export type Window = ClosedEnum<typeof Window>;
|
|
75
|
+
|
|
76
|
+
export type LeaderboardGetChangesRequestBody = {
|
|
77
|
+
/**
|
|
78
|
+
* improvements = positive delta, declines = negative delta.
|
|
79
|
+
*/
|
|
80
|
+
direction: LeaderboardGetChangesRequestBodyDirection;
|
|
81
|
+
/**
|
|
82
|
+
* Which leaderboard the delta is computed against.
|
|
83
|
+
*/
|
|
84
|
+
leaderboard: LeaderboardGetChangesRequestBodyLeaderboard;
|
|
85
|
+
/**
|
|
86
|
+
* Number of accounts returned. Default 100.
|
|
87
|
+
*/
|
|
88
|
+
limit?: number | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* What to sort by. score = XP/playtime/badges depending on leaderboard. rank = leaderboard position.
|
|
91
|
+
*/
|
|
92
|
+
metric: Metric;
|
|
93
|
+
/**
|
|
94
|
+
* Lookback window for the delta.
|
|
95
|
+
*/
|
|
96
|
+
window: Window;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
export const LeaderboardGetChangesRequestBodyDirection$outboundSchema:
|
|
101
|
+
z.ZodNativeEnum<typeof LeaderboardGetChangesRequestBodyDirection> = z
|
|
102
|
+
.nativeEnum(LeaderboardGetChangesRequestBodyDirection);
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const LeaderboardGetChangesRequestBodyLeaderboard$outboundSchema:
|
|
106
|
+
z.ZodNativeEnum<typeof LeaderboardGetChangesRequestBodyLeaderboard> = z
|
|
107
|
+
.nativeEnum(LeaderboardGetChangesRequestBodyLeaderboard);
|
|
108
|
+
|
|
109
|
+
/** @internal */
|
|
110
|
+
export const Metric$outboundSchema: z.ZodNativeEnum<typeof Metric> = z
|
|
111
|
+
.nativeEnum(Metric);
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const Window$outboundSchema: z.ZodNativeEnum<typeof Window> = z
|
|
115
|
+
.nativeEnum(Window);
|
|
116
|
+
|
|
117
|
+
/** @internal */
|
|
118
|
+
export type LeaderboardGetChangesRequestBody$Outbound = {
|
|
119
|
+
direction: string;
|
|
120
|
+
leaderboard: string;
|
|
121
|
+
limit?: number | undefined;
|
|
122
|
+
metric: string;
|
|
123
|
+
window: string;
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const LeaderboardGetChangesRequestBody$outboundSchema: z.ZodType<
|
|
128
|
+
LeaderboardGetChangesRequestBody$Outbound,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
LeaderboardGetChangesRequestBody
|
|
131
|
+
> = z.object({
|
|
132
|
+
direction: LeaderboardGetChangesRequestBodyDirection$outboundSchema,
|
|
133
|
+
leaderboard: LeaderboardGetChangesRequestBodyLeaderboard$outboundSchema,
|
|
134
|
+
limit: z.number().int().optional(),
|
|
135
|
+
metric: Metric$outboundSchema,
|
|
136
|
+
window: Window$outboundSchema,
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export function leaderboardGetChangesRequestBodyToJSON(
|
|
140
|
+
leaderboardGetChangesRequestBody: LeaderboardGetChangesRequestBody,
|
|
141
|
+
): string {
|
|
142
|
+
return JSON.stringify(
|
|
143
|
+
LeaderboardGetChangesRequestBody$outboundSchema.parse(
|
|
144
|
+
leaderboardGetChangesRequestBody,
|
|
145
|
+
),
|
|
146
|
+
);
|
|
147
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
LeaderboardChange,
|
|
12
|
+
LeaderboardChange$inboundSchema,
|
|
13
|
+
} from "./leaderboardchange.js";
|
|
14
|
+
|
|
15
|
+
export type LeaderboardGetChangesResponseBody = {
|
|
16
|
+
/**
|
|
17
|
+
* A URL to the JSON Schema for this object.
|
|
18
|
+
*/
|
|
19
|
+
dollarSchema?: string | undefined;
|
|
20
|
+
changes: Array<LeaderboardChange> | null;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const LeaderboardGetChangesResponseBody$inboundSchema: z.ZodType<
|
|
25
|
+
LeaderboardGetChangesResponseBody,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
$schema: z.string().optional(),
|
|
30
|
+
changes: z.nullable(z.array(LeaderboardChange$inboundSchema)),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"$schema": "dollarSchema",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export function leaderboardGetChangesResponseBodyFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<LeaderboardGetChangesResponseBody, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => LeaderboardGetChangesResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'LeaderboardGetChangesResponseBody' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type V1ActivityStreamHeartbeat = {
|
|
11
|
+
heartbeat: number;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const V1ActivityStreamHeartbeat$inboundSchema: z.ZodType<
|
|
16
|
+
V1ActivityStreamHeartbeat,
|
|
17
|
+
z.ZodTypeDef,
|
|
18
|
+
unknown
|
|
19
|
+
> = z.object({
|
|
20
|
+
heartbeat: z.number().int(),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export function v1ActivityStreamHeartbeatFromJSON(
|
|
24
|
+
jsonString: string,
|
|
25
|
+
): SafeParseResult<V1ActivityStreamHeartbeat, SDKValidationError> {
|
|
26
|
+
return safeParse(
|
|
27
|
+
jsonString,
|
|
28
|
+
(x) => V1ActivityStreamHeartbeat$inboundSchema.parse(JSON.parse(x)),
|
|
29
|
+
`Failed to parse 'V1ActivityStreamHeartbeat' from JSON`,
|
|
30
|
+
);
|
|
31
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type V1AdminCmsDeleteRequestBody = {
|
|
9
|
+
documentUid: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type V1AdminCmsDeleteRequestBody$Outbound = {
|
|
14
|
+
document_uid: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const V1AdminCmsDeleteRequestBody$outboundSchema: z.ZodType<
|
|
19
|
+
V1AdminCmsDeleteRequestBody$Outbound,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
V1AdminCmsDeleteRequestBody
|
|
22
|
+
> = z.object({
|
|
23
|
+
documentUid: z.string(),
|
|
24
|
+
}).transform((v) => {
|
|
25
|
+
return remap$(v, {
|
|
26
|
+
documentUid: "document_uid",
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export function v1AdminCmsDeleteRequestBodyToJSON(
|
|
31
|
+
v1AdminCmsDeleteRequestBody: V1AdminCmsDeleteRequestBody,
|
|
32
|
+
): string {
|
|
33
|
+
return JSON.stringify(
|
|
34
|
+
V1AdminCmsDeleteRequestBody$outboundSchema.parse(
|
|
35
|
+
v1AdminCmsDeleteRequestBody,
|
|
36
|
+
),
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type CmsDeleteResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const CmsDeleteResponse$inboundSchema: z.ZodType<
|
|
18
|
+
CmsDeleteResponse,
|
|
19
|
+
z.ZodTypeDef,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.object({
|
|
22
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
23
|
+
}).transform((v) => {
|
|
24
|
+
return remap$(v, {
|
|
25
|
+
"HttpMeta": "httpMeta",
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function cmsDeleteResponseFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<CmsDeleteResponse, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => CmsDeleteResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'CmsDeleteResponse' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -44,8 +44,6 @@ export * from "./accountuploadimages.js";
|
|
|
44
44
|
export * from "./accountverifyconnection.js";
|
|
45
45
|
export * from "./accountverifyemail.js";
|
|
46
46
|
export * from "./activitylistaccountfeed.js";
|
|
47
|
-
export * from "./activitylistglobalfeed.js";
|
|
48
|
-
export * from "./activitystreamglobalfeed.js";
|
|
49
47
|
export * from "./admingetaccount.js";
|
|
50
48
|
export * from "./adminremovevanity.js";
|
|
51
49
|
export * from "./adminupdateresources.js";
|
|
@@ -58,6 +56,7 @@ export * from "./badgesuggesttags.js";
|
|
|
58
56
|
export * from "./badgetagbadge.js";
|
|
59
57
|
export * from "./cmsarchive.js";
|
|
60
58
|
export * from "./cmscreate.js";
|
|
59
|
+
export * from "./cmsdelete.js";
|
|
61
60
|
export * from "./cmslist.js";
|
|
62
61
|
export * from "./cmslistassets.js";
|
|
63
62
|
export * from "./cmspreviewtoken.js";
|
|
@@ -68,13 +67,16 @@ export * from "./cmsuploadimage.js";
|
|
|
68
67
|
export * from "./cmsversions.js";
|
|
69
68
|
export * from "./leaderboardgetaccountleaderboard.js";
|
|
70
69
|
export * from "./leaderboardgetaccountsmeta.js";
|
|
70
|
+
export * from "./leaderboardgetchanges.js";
|
|
71
71
|
export * from "./leaderboardgetgroupleaderboard.js";
|
|
72
72
|
export * from "./leaderboardgetgroupsmeta.js";
|
|
73
73
|
export * from "./leaderboardgetlowestranks.js";
|
|
74
74
|
export * from "./leaderboardlistbadges.js";
|
|
75
75
|
export * from "./leaderboardpreviewaccountrank.js";
|
|
76
76
|
export * from "./list.js";
|
|
77
|
+
export * from "./listglobalfeed.js";
|
|
77
78
|
export * from "./locationgetlocations.js";
|
|
78
79
|
export * from "./staffliststaff.js";
|
|
79
80
|
export * from "./statsgetstats.js";
|
|
81
|
+
export * from "./streamglobalfeed.js";
|
|
80
82
|
export * from "./vanityverify.js";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type LeaderboardGetChangesResponse = {
|
|
13
|
+
httpMeta: components.HTTPMetadata;
|
|
14
|
+
/**
|
|
15
|
+
* OK
|
|
16
|
+
*/
|
|
17
|
+
leaderboardGetChangesResponseBody?:
|
|
18
|
+
| components.LeaderboardGetChangesResponseBody
|
|
19
|
+
| undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const LeaderboardGetChangesResponse$inboundSchema: z.ZodType<
|
|
24
|
+
LeaderboardGetChangesResponse,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
29
|
+
LeaderboardGetChangesResponseBody: components
|
|
30
|
+
.LeaderboardGetChangesResponseBody$inboundSchema.optional(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"HttpMeta": "httpMeta",
|
|
34
|
+
"LeaderboardGetChangesResponseBody": "leaderboardGetChangesResponseBody",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function leaderboardGetChangesResponseFromJSON(
|
|
39
|
+
jsonString: string,
|
|
40
|
+
): SafeParseResult<LeaderboardGetChangesResponse, SDKValidationError> {
|
|
41
|
+
return safeParse(
|
|
42
|
+
jsonString,
|
|
43
|
+
(x) => LeaderboardGetChangesResponse$inboundSchema.parse(JSON.parse(x)),
|
|
44
|
+
`Failed to parse 'LeaderboardGetChangesResponse' from JSON`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -9,7 +9,7 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import * as components from "../components/index.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
-
export type
|
|
12
|
+
export type ListGlobalFeedResponse = {
|
|
13
13
|
httpMeta: components.HTTPMetadata;
|
|
14
14
|
/**
|
|
15
15
|
* OK
|
|
@@ -20,8 +20,8 @@ export type ActivityListGlobalFeedResponse = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
/** @internal */
|
|
23
|
-
export const
|
|
24
|
-
|
|
23
|
+
export const ListGlobalFeedResponse$inboundSchema: z.ZodType<
|
|
24
|
+
ListGlobalFeedResponse,
|
|
25
25
|
z.ZodTypeDef,
|
|
26
26
|
unknown
|
|
27
27
|
> = z.object({
|
|
@@ -36,12 +36,12 @@ export const ActivityListGlobalFeedResponse$inboundSchema: z.ZodType<
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
export function
|
|
39
|
+
export function listGlobalFeedResponseFromJSON(
|
|
40
40
|
jsonString: string,
|
|
41
|
-
): SafeParseResult<
|
|
41
|
+
): SafeParseResult<ListGlobalFeedResponse, SDKValidationError> {
|
|
42
42
|
return safeParse(
|
|
43
43
|
jsonString,
|
|
44
|
-
(x) =>
|
|
45
|
-
`Failed to parse '
|
|
44
|
+
(x) => ListGlobalFeedResponse$inboundSchema.parse(JSON.parse(x)),
|
|
45
|
+
`Failed to parse 'ListGlobalFeedResponse' from JSON`,
|
|
46
46
|
);
|
|
47
47
|
}
|
|
@@ -10,6 +10,22 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import * as components from "../components/index.js";
|
|
11
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
12
|
|
|
13
|
+
export type EventActivityHeartbeat = {
|
|
14
|
+
data: components.V1ActivityStreamHeartbeat;
|
|
15
|
+
/**
|
|
16
|
+
* The event name.
|
|
17
|
+
*/
|
|
18
|
+
event: "activity-heartbeat";
|
|
19
|
+
/**
|
|
20
|
+
* The event ID.
|
|
21
|
+
*/
|
|
22
|
+
id?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* The retry time in milliseconds.
|
|
25
|
+
*/
|
|
26
|
+
retry?: number | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
13
29
|
export type EventActivityEmitted = {
|
|
14
30
|
data: components.V1ActivityStreamFeedEvent;
|
|
15
31
|
/**
|
|
@@ -29,20 +45,53 @@ export type EventActivityEmitted = {
|
|
|
29
45
|
/**
|
|
30
46
|
* Each oneOf object in the array represents one possible Server Sent Events (SSE) message, serialized as UTF-8 text according to the SSE specification.
|
|
31
47
|
*/
|
|
32
|
-
export type
|
|
48
|
+
export type StreamGlobalFeedServerSentEvents =
|
|
49
|
+
| EventActivityEmitted
|
|
50
|
+
| EventActivityHeartbeat;
|
|
33
51
|
|
|
34
|
-
export type
|
|
52
|
+
export type StreamGlobalFeedResponse = {
|
|
35
53
|
httpMeta: components.HTTPMetadata;
|
|
36
54
|
/**
|
|
37
55
|
* OK
|
|
38
56
|
*/
|
|
39
|
-
serverSentEvents?:
|
|
57
|
+
serverSentEvents?:
|
|
58
|
+
| EventStream<EventActivityEmitted | EventActivityHeartbeat>
|
|
59
|
+
| undefined;
|
|
40
60
|
/**
|
|
41
61
|
* Error
|
|
42
62
|
*/
|
|
43
63
|
errorModel?: components.ErrorModel | undefined;
|
|
44
64
|
};
|
|
45
65
|
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const EventActivityHeartbeat$inboundSchema: z.ZodType<
|
|
68
|
+
EventActivityHeartbeat,
|
|
69
|
+
z.ZodTypeDef,
|
|
70
|
+
unknown
|
|
71
|
+
> = z.object({
|
|
72
|
+
data: z.string().transform((v, ctx) => {
|
|
73
|
+
try {
|
|
74
|
+
return JSON.parse(v);
|
|
75
|
+
} catch (err) {
|
|
76
|
+
ctx.addIssue({ code: "custom", message: `malformed json: ${err}` });
|
|
77
|
+
return z.NEVER;
|
|
78
|
+
}
|
|
79
|
+
}).pipe(components.V1ActivityStreamHeartbeat$inboundSchema),
|
|
80
|
+
event: z.literal("activity-heartbeat"),
|
|
81
|
+
id: z.string().optional(),
|
|
82
|
+
retry: z.number().int().optional(),
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export function eventActivityHeartbeatFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<EventActivityHeartbeat, SDKValidationError> {
|
|
88
|
+
return safeParse(
|
|
89
|
+
jsonString,
|
|
90
|
+
(x) => EventActivityHeartbeat$inboundSchema.parse(JSON.parse(x)),
|
|
91
|
+
`Failed to parse 'EventActivityHeartbeat' from JSON`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
46
95
|
/** @internal */
|
|
47
96
|
export const EventActivityEmitted$inboundSchema: z.ZodType<
|
|
48
97
|
EventActivityEmitted,
|
|
@@ -73,31 +122,28 @@ export function eventActivityEmittedFromJSON(
|
|
|
73
122
|
}
|
|
74
123
|
|
|
75
124
|
/** @internal */
|
|
76
|
-
export const
|
|
77
|
-
|
|
125
|
+
export const StreamGlobalFeedServerSentEvents$inboundSchema: z.ZodType<
|
|
126
|
+
StreamGlobalFeedServerSentEvents,
|
|
78
127
|
z.ZodTypeDef,
|
|
79
128
|
unknown
|
|
80
|
-
> = z.
|
|
129
|
+
> = z.union([
|
|
130
|
+
z.lazy(() => EventActivityEmitted$inboundSchema),
|
|
131
|
+
z.lazy(() => EventActivityHeartbeat$inboundSchema),
|
|
132
|
+
]);
|
|
81
133
|
|
|
82
|
-
export function
|
|
134
|
+
export function streamGlobalFeedServerSentEventsFromJSON(
|
|
83
135
|
jsonString: string,
|
|
84
|
-
): SafeParseResult<
|
|
85
|
-
ActivityStreamGlobalFeedServerSentEvents,
|
|
86
|
-
SDKValidationError
|
|
87
|
-
> {
|
|
136
|
+
): SafeParseResult<StreamGlobalFeedServerSentEvents, SDKValidationError> {
|
|
88
137
|
return safeParse(
|
|
89
138
|
jsonString,
|
|
90
|
-
(x) =>
|
|
91
|
-
|
|
92
|
-
JSON.parse(x),
|
|
93
|
-
),
|
|
94
|
-
`Failed to parse 'ActivityStreamGlobalFeedServerSentEvents' from JSON`,
|
|
139
|
+
(x) => StreamGlobalFeedServerSentEvents$inboundSchema.parse(JSON.parse(x)),
|
|
140
|
+
`Failed to parse 'StreamGlobalFeedServerSentEvents' from JSON`,
|
|
95
141
|
);
|
|
96
142
|
}
|
|
97
143
|
|
|
98
144
|
/** @internal */
|
|
99
|
-
export const
|
|
100
|
-
|
|
145
|
+
export const StreamGlobalFeedResponse$inboundSchema: z.ZodType<
|
|
146
|
+
StreamGlobalFeedResponse,
|
|
101
147
|
z.ZodTypeDef,
|
|
102
148
|
unknown
|
|
103
149
|
> = z.object({
|
|
@@ -107,9 +153,10 @@ export const ActivityStreamGlobalFeedResponse$inboundSchema: z.ZodType<
|
|
|
107
153
|
return new EventStream(stream, rawEvent => {
|
|
108
154
|
return {
|
|
109
155
|
done: false,
|
|
110
|
-
value: z.
|
|
111
|
-
|
|
112
|
-
|
|
156
|
+
value: z.union([
|
|
157
|
+
z.lazy(() => EventActivityEmitted$inboundSchema),
|
|
158
|
+
z.lazy(() => EventActivityHeartbeat$inboundSchema),
|
|
159
|
+
]).parse(rawEvent),
|
|
113
160
|
};
|
|
114
161
|
});
|
|
115
162
|
}).optional(),
|
|
@@ -122,12 +169,12 @@ export const ActivityStreamGlobalFeedResponse$inboundSchema: z.ZodType<
|
|
|
122
169
|
});
|
|
123
170
|
});
|
|
124
171
|
|
|
125
|
-
export function
|
|
172
|
+
export function streamGlobalFeedResponseFromJSON(
|
|
126
173
|
jsonString: string,
|
|
127
|
-
): SafeParseResult<
|
|
174
|
+
): SafeParseResult<StreamGlobalFeedResponse, SDKValidationError> {
|
|
128
175
|
return safeParse(
|
|
129
176
|
jsonString,
|
|
130
|
-
(x) =>
|
|
131
|
-
`Failed to parse '
|
|
177
|
+
(x) => StreamGlobalFeedResponse$inboundSchema.parse(JSON.parse(x)),
|
|
178
|
+
`Failed to parse 'StreamGlobalFeedResponse' from JSON`,
|
|
132
179
|
);
|
|
133
180
|
}
|
package/src/sdk/activity.ts
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { activityActivityListAccountFeed } from "../funcs/activityActivityListAccountFeed.js";
|
|
6
|
-
import {
|
|
6
|
+
import { activityListGlobalFeed } from "../funcs/activityListGlobalFeed.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "../funcs/
|
|
8
|
+
activityStreamGlobalFeed,
|
|
9
|
+
StreamGlobalFeedAcceptEnum,
|
|
10
|
+
} from "../funcs/activityStreamGlobalFeed.js";
|
|
11
11
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
12
|
import * as components from "../models/components/index.js";
|
|
13
13
|
import * as operations from "../models/operations/index.js";
|
|
14
14
|
import { unwrapAsync } from "../types/fp.js";
|
|
15
15
|
|
|
16
|
-
export {
|
|
16
|
+
export { StreamGlobalFeedAcceptEnum } from "../funcs/activityStreamGlobalFeed.js";
|
|
17
17
|
|
|
18
18
|
export class Activity extends ClientSDK {
|
|
19
19
|
/**
|
|
@@ -33,11 +33,11 @@ export class Activity extends ClientSDK {
|
|
|
33
33
|
/**
|
|
34
34
|
* List the global activity feed
|
|
35
35
|
*/
|
|
36
|
-
async
|
|
36
|
+
async listGlobalFeed(
|
|
37
37
|
request: components.V1ActivityListGlobalFeedRequestBody,
|
|
38
38
|
options?: RequestOptions,
|
|
39
|
-
): Promise<operations.
|
|
40
|
-
return unwrapAsync(
|
|
39
|
+
): Promise<operations.ListGlobalFeedResponse> {
|
|
40
|
+
return unwrapAsync(activityListGlobalFeed(
|
|
41
41
|
this,
|
|
42
42
|
request,
|
|
43
43
|
options,
|
|
@@ -47,12 +47,12 @@ export class Activity extends ClientSDK {
|
|
|
47
47
|
/**
|
|
48
48
|
* Live server-sent-events stream of the global activity feed
|
|
49
49
|
*/
|
|
50
|
-
async
|
|
50
|
+
async streamGlobalFeed(
|
|
51
51
|
options?: RequestOptions & {
|
|
52
|
-
acceptHeaderOverride?:
|
|
52
|
+
acceptHeaderOverride?: StreamGlobalFeedAcceptEnum;
|
|
53
53
|
},
|
|
54
|
-
): Promise<operations.
|
|
55
|
-
return unwrapAsync(
|
|
54
|
+
): Promise<operations.StreamGlobalFeedResponse> {
|
|
55
|
+
return unwrapAsync(activityStreamGlobalFeed(
|
|
56
56
|
this,
|
|
57
57
|
options,
|
|
58
58
|
));
|
package/src/sdk/admin.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { adminAdminUpdateRoleOverride } from "../funcs/adminAdminUpdateRoleOverride.js";
|
|
6
6
|
import { adminCmsArchive } from "../funcs/adminCmsArchive.js";
|
|
7
7
|
import { adminCmsCreate } from "../funcs/adminCmsCreate.js";
|
|
8
|
+
import { adminCmsDelete } from "../funcs/adminCmsDelete.js";
|
|
8
9
|
import { adminCmsList } from "../funcs/adminCmsList.js";
|
|
9
10
|
import { adminCmsListAssets } from "../funcs/adminCmsListAssets.js";
|
|
10
11
|
import { adminCmsPreviewToken } from "../funcs/adminCmsPreviewToken.js";
|
|
@@ -51,6 +52,23 @@ export class Admin extends ClientSDK {
|
|
|
51
52
|
));
|
|
52
53
|
}
|
|
53
54
|
|
|
55
|
+
/**
|
|
56
|
+
* Permanently delete a CMS document and all its versions
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Hard delete: removes the cms_document row + every cms_document_version row pointing at it. Irreversible. Public reads stay correct because the type cache is invalidated. The CMS admin UI should restrict this to archived documents to give staff one extra step before destruction.
|
|
60
|
+
*/
|
|
61
|
+
async cmsDelete(
|
|
62
|
+
request: components.V1AdminCmsDeleteRequestBody,
|
|
63
|
+
options?: RequestOptions,
|
|
64
|
+
): Promise<operations.CmsDeleteResponse> {
|
|
65
|
+
return unwrapAsync(adminCmsDelete(
|
|
66
|
+
this,
|
|
67
|
+
request,
|
|
68
|
+
options,
|
|
69
|
+
));
|
|
70
|
+
}
|
|
71
|
+
|
|
54
72
|
/**
|
|
55
73
|
* List CMS documents (drafts + published) for editor
|
|
56
74
|
*/
|