@cstar.help/js 0.17.0 → 0.17.3
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 +17 -12
- package/dist/chat/index.cjs +202 -72
- package/dist/chat/index.d.cts +4 -8
- package/dist/chat/index.d.ts +4 -8
- package/dist/chat/index.js +202 -72
- package/dist/index.cjs +29 -27
- package/dist/index.d.cts +187 -60
- package/dist/index.d.ts +187 -60
- package/dist/index.js +29 -27
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -278,7 +278,7 @@ function parseError(statusCode, body, retryAfter) {
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
// src/client.ts
|
|
281
|
-
var SDK_VERSION = "0.
|
|
281
|
+
var SDK_VERSION = "0.17.3";
|
|
282
282
|
var DEFAULT_BASE_URL = "https://www.cstar.help";
|
|
283
283
|
var DEFAULT_API_VERSION = "2026-03-01";
|
|
284
284
|
var DEFAULT_MAX_RETRIES = 3;
|
|
@@ -1979,7 +1979,7 @@ var BossResource = class {
|
|
|
1979
1979
|
/** List boss defeat history. */
|
|
1980
1980
|
async defeats(params) {
|
|
1981
1981
|
return this.client.request("GET", "/game/boss/defeats", {
|
|
1982
|
-
query: params
|
|
1982
|
+
query: params ? { ...params } : void 0
|
|
1983
1983
|
});
|
|
1984
1984
|
}
|
|
1985
1985
|
/** Get a single defeat record. */
|
|
@@ -1994,25 +1994,25 @@ var AchievementsResource = class {
|
|
|
1994
1994
|
/** List all achievements with progress. `params.userId` is required. */
|
|
1995
1995
|
async list(params) {
|
|
1996
1996
|
return this.client.request("GET", "/game/achievements", {
|
|
1997
|
-
query: params
|
|
1997
|
+
query: params ? { ...params } : void 0
|
|
1998
1998
|
});
|
|
1999
1999
|
}
|
|
2000
2000
|
/** List unlocked achievements only. */
|
|
2001
2001
|
async unlocked(params) {
|
|
2002
2002
|
return this.client.request("GET", "/game/achievements/unlocked", {
|
|
2003
|
-
query: params
|
|
2003
|
+
query: params ? { ...params } : void 0
|
|
2004
2004
|
});
|
|
2005
2005
|
}
|
|
2006
2006
|
/** Get a single achievement. */
|
|
2007
2007
|
async get(achievementId, params) {
|
|
2008
2008
|
return this.client.request("GET", `/game/achievements/${achievementId}`, {
|
|
2009
|
-
query: params
|
|
2009
|
+
query: params ? { ...params } : void 0
|
|
2010
2010
|
});
|
|
2011
2011
|
}
|
|
2012
2012
|
/** Get recently unlocked achievements across the team. */
|
|
2013
2013
|
async recent(params) {
|
|
2014
2014
|
return this.client.request("GET", "/game/achievements/recent", {
|
|
2015
|
-
query: params
|
|
2015
|
+
query: params ? { ...params } : void 0
|
|
2016
2016
|
});
|
|
2017
2017
|
}
|
|
2018
2018
|
};
|
|
@@ -2023,13 +2023,13 @@ var GameActivityResource = class {
|
|
|
2023
2023
|
/** Get the team activity feed. */
|
|
2024
2024
|
async list(params) {
|
|
2025
2025
|
return this.client.request("GET", "/game/activity", {
|
|
2026
|
-
query: params
|
|
2026
|
+
query: params ? { ...params } : void 0
|
|
2027
2027
|
});
|
|
2028
2028
|
}
|
|
2029
2029
|
/** Get activity for a specific member. */
|
|
2030
2030
|
async forMember(memberId, params) {
|
|
2031
2031
|
return this.client.request("GET", `/game/activity/member/${memberId}`, {
|
|
2032
|
-
query: params
|
|
2032
|
+
query: params ? { ...params } : void 0
|
|
2033
2033
|
});
|
|
2034
2034
|
}
|
|
2035
2035
|
};
|
|
@@ -2040,13 +2040,13 @@ var QuestsResource = class {
|
|
|
2040
2040
|
/** Get today's quests. */
|
|
2041
2041
|
async today(params) {
|
|
2042
2042
|
return this.client.request("GET", "/game/quests/today", {
|
|
2043
|
-
query: params
|
|
2043
|
+
query: params ? { ...params } : void 0
|
|
2044
2044
|
});
|
|
2045
2045
|
}
|
|
2046
2046
|
/** Get quest history. */
|
|
2047
2047
|
async history(params) {
|
|
2048
2048
|
return this.client.request("GET", "/game/quests/history", {
|
|
2049
|
-
query: params
|
|
2049
|
+
query: params ? { ...params } : void 0
|
|
2050
2050
|
});
|
|
2051
2051
|
}
|
|
2052
2052
|
};
|
|
@@ -2057,10 +2057,10 @@ var PuzzlesResource = class {
|
|
|
2057
2057
|
/** Get today's puzzle. */
|
|
2058
2058
|
async today(params) {
|
|
2059
2059
|
return this.client.request("GET", "/game/puzzles/today", {
|
|
2060
|
-
query: params
|
|
2060
|
+
query: params ? { ...params } : void 0
|
|
2061
2061
|
});
|
|
2062
2062
|
}
|
|
2063
|
-
/**
|
|
2063
|
+
/** Record a completed puzzle, its timing and result. */
|
|
2064
2064
|
async complete(params, options) {
|
|
2065
2065
|
return this.client.request("POST", "/game/puzzles/complete", {
|
|
2066
2066
|
body: params,
|
|
@@ -2070,13 +2070,13 @@ var PuzzlesResource = class {
|
|
|
2070
2070
|
/** Get puzzle streak for a user. */
|
|
2071
2071
|
async streak(params) {
|
|
2072
2072
|
return this.client.request("GET", "/game/puzzles/streak", {
|
|
2073
|
-
query: params
|
|
2073
|
+
query: params ? { ...params } : void 0
|
|
2074
2074
|
});
|
|
2075
2075
|
}
|
|
2076
2076
|
/** Get puzzle leaderboard. */
|
|
2077
2077
|
async leaderboard(params) {
|
|
2078
2078
|
return this.client.request("GET", "/game/puzzles/leaderboard", {
|
|
2079
|
-
query: params
|
|
2079
|
+
query: params ? { ...params } : void 0
|
|
2080
2080
|
});
|
|
2081
2081
|
}
|
|
2082
2082
|
};
|
|
@@ -2087,7 +2087,7 @@ var OneUpsResource = class {
|
|
|
2087
2087
|
/** List one-ups. */
|
|
2088
2088
|
async list(params) {
|
|
2089
2089
|
return this.client.request("GET", "/game/one-ups", {
|
|
2090
|
-
query: params
|
|
2090
|
+
query: params ? { ...params } : void 0
|
|
2091
2091
|
});
|
|
2092
2092
|
}
|
|
2093
2093
|
/** Send a one-up. */
|
|
@@ -2100,7 +2100,7 @@ var OneUpsResource = class {
|
|
|
2100
2100
|
/** Check remaining free one-ups today. */
|
|
2101
2101
|
async remaining(params) {
|
|
2102
2102
|
return this.client.request("GET", "/game/one-ups/remaining", {
|
|
2103
|
-
query: params
|
|
2103
|
+
query: params ? { ...params } : void 0
|
|
2104
2104
|
});
|
|
2105
2105
|
}
|
|
2106
2106
|
};
|
|
@@ -2111,7 +2111,7 @@ var HighFivesResource = class {
|
|
|
2111
2111
|
/** List high fives. */
|
|
2112
2112
|
async list(params) {
|
|
2113
2113
|
return this.client.request("GET", "/game/high-fives", {
|
|
2114
|
-
query: params
|
|
2114
|
+
query: params ? { ...params } : void 0
|
|
2115
2115
|
});
|
|
2116
2116
|
}
|
|
2117
2117
|
/** Send a high five. */
|
|
@@ -2124,7 +2124,7 @@ var HighFivesResource = class {
|
|
|
2124
2124
|
/** Check if you can send a high five to a team. */
|
|
2125
2125
|
async canSend(recipientTeamId, params) {
|
|
2126
2126
|
return this.client.request("GET", `/game/high-fives/can-send/${recipientTeamId}`, {
|
|
2127
|
-
query: params
|
|
2127
|
+
query: params ? { ...params } : void 0
|
|
2128
2128
|
});
|
|
2129
2129
|
}
|
|
2130
2130
|
};
|
|
@@ -2135,13 +2135,13 @@ var CosmeticsResource = class {
|
|
|
2135
2135
|
/** List unlocked cosmetics. */
|
|
2136
2136
|
async list(params) {
|
|
2137
2137
|
return this.client.request("GET", "/game/cosmetics", {
|
|
2138
|
-
query: params
|
|
2138
|
+
query: params ? { ...params } : void 0
|
|
2139
2139
|
});
|
|
2140
2140
|
}
|
|
2141
2141
|
/** Get cosmetic preferences. */
|
|
2142
2142
|
async getPreferences(params) {
|
|
2143
2143
|
return this.client.request("GET", "/game/cosmetics/preferences", {
|
|
2144
|
-
query: params
|
|
2144
|
+
query: params ? { ...params } : void 0
|
|
2145
2145
|
});
|
|
2146
2146
|
}
|
|
2147
2147
|
/** Update cosmetic preferences. */
|
|
@@ -2154,8 +2154,10 @@ var SeasonsResource = class {
|
|
|
2154
2154
|
this.client = client;
|
|
2155
2155
|
}
|
|
2156
2156
|
/** List all seasons. */
|
|
2157
|
-
async list() {
|
|
2158
|
-
return this.client.request("GET", "/game/seasons"
|
|
2157
|
+
async list(params) {
|
|
2158
|
+
return this.client.request("GET", "/game/seasons", {
|
|
2159
|
+
query: params ? { ...params } : void 0
|
|
2160
|
+
});
|
|
2159
2161
|
}
|
|
2160
2162
|
/** Get the current active season. */
|
|
2161
2163
|
async current() {
|
|
@@ -2164,7 +2166,7 @@ var SeasonsResource = class {
|
|
|
2164
2166
|
/** Get user stats for a season. */
|
|
2165
2167
|
async stats(seasonId, params) {
|
|
2166
2168
|
return this.client.request("GET", `/game/seasons/${seasonId}/stats`, {
|
|
2167
|
-
query: params
|
|
2169
|
+
query: params ? { ...params } : void 0
|
|
2168
2170
|
});
|
|
2169
2171
|
}
|
|
2170
2172
|
};
|
|
@@ -2175,7 +2177,7 @@ var SkillsResource = class {
|
|
|
2175
2177
|
/** Get the skill tree with current allocations. */
|
|
2176
2178
|
async get(params) {
|
|
2177
2179
|
return this.client.request("GET", "/game/skills", {
|
|
2178
|
-
query: params
|
|
2180
|
+
query: params ? { ...params } : void 0
|
|
2179
2181
|
});
|
|
2180
2182
|
}
|
|
2181
2183
|
/** Allocate a skill point. */
|
|
@@ -2210,7 +2212,7 @@ var GameResource = class {
|
|
|
2210
2212
|
/** Get current player stats. */
|
|
2211
2213
|
async player(params) {
|
|
2212
2214
|
return this.client.request("GET", "/game/player", {
|
|
2213
|
-
query: params
|
|
2215
|
+
query: params ? { ...params } : void 0
|
|
2214
2216
|
});
|
|
2215
2217
|
}
|
|
2216
2218
|
/** Get a specific player's stats by membership ID. */
|
|
@@ -2225,13 +2227,13 @@ var GameResource = class {
|
|
|
2225
2227
|
*/
|
|
2226
2228
|
async leaderboard(params) {
|
|
2227
2229
|
return this.client.request("GET", "/game/leaderboard", {
|
|
2228
|
-
query: params
|
|
2230
|
+
query: params ? { ...params } : void 0
|
|
2229
2231
|
});
|
|
2230
2232
|
}
|
|
2231
2233
|
/** Get the current user's leaderboard position. */
|
|
2232
2234
|
async myRank(params) {
|
|
2233
2235
|
return this.client.request("GET", "/game/leaderboard/me", {
|
|
2234
|
-
query: params
|
|
2236
|
+
query: params ? { ...params } : void 0
|
|
2235
2237
|
});
|
|
2236
2238
|
}
|
|
2237
2239
|
/** Get game balance configuration (read-only constants). */
|
package/dist/index.d.cts
CHANGED
|
@@ -2078,10 +2078,16 @@ interface Boss {
|
|
|
2078
2078
|
interface BossDamageResult {
|
|
2079
2079
|
object: 'boss_damage';
|
|
2080
2080
|
damage: number;
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2081
|
+
currentHealth: number;
|
|
2082
|
+
/** Health fractions use the 0 to 1 range. */
|
|
2083
|
+
healthPercent: number;
|
|
2084
|
+
previousHealthPercent: number;
|
|
2085
|
+
isDefeated: boolean;
|
|
2086
|
+
isKillingBlow: boolean;
|
|
2087
|
+
shieldBlocked: boolean;
|
|
2088
|
+
shieldBroken: boolean;
|
|
2089
|
+
enrageTriggered: boolean;
|
|
2090
|
+
activeAbilities: string[];
|
|
2085
2091
|
}
|
|
2086
2092
|
/** Boss defeat record. */
|
|
2087
2093
|
interface BossDefeat {
|
|
@@ -2106,8 +2112,10 @@ interface BossSpawnParams {
|
|
|
2106
2112
|
}
|
|
2107
2113
|
/** Parameters for dealing boss damage. */
|
|
2108
2114
|
interface BossDamageParams {
|
|
2109
|
-
|
|
2110
|
-
|
|
2115
|
+
/** Defaults to the API key's creator. */
|
|
2116
|
+
userId?: string;
|
|
2117
|
+
userName?: string;
|
|
2118
|
+
priority?: 'low' | 'normal' | 'high' | 'urgent';
|
|
2111
2119
|
}
|
|
2112
2120
|
/** Leaderboard entry. */
|
|
2113
2121
|
interface LeaderboardEntry {
|
|
@@ -2141,22 +2149,52 @@ interface Achievement {
|
|
|
2141
2149
|
}
|
|
2142
2150
|
/** Parameters for listing achievements. */
|
|
2143
2151
|
interface AchievementListParams extends PaginationParams {
|
|
2144
|
-
/** Whose achievement progress to load. Required
|
|
2152
|
+
/** Whose achievement progress to load. Required; the endpoint 400s without it. */
|
|
2145
2153
|
userId: string;
|
|
2146
2154
|
category?: string;
|
|
2147
2155
|
}
|
|
2148
2156
|
/** A daily quest. */
|
|
2149
2157
|
interface Quest {
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
title: string;
|
|
2158
|
+
questId: string;
|
|
2159
|
+
name: string;
|
|
2153
2160
|
description: string | null;
|
|
2154
|
-
|
|
2161
|
+
difficulty: string;
|
|
2162
|
+
progress: number;
|
|
2155
2163
|
target: number;
|
|
2156
|
-
current: number;
|
|
2157
2164
|
completed: boolean;
|
|
2158
|
-
xpReward: number;
|
|
2159
2165
|
completedAt: string | null;
|
|
2166
|
+
xpReward: number;
|
|
2167
|
+
goldReward: number;
|
|
2168
|
+
}
|
|
2169
|
+
/** Today's quests and daily completion metadata. */
|
|
2170
|
+
interface QuestList {
|
|
2171
|
+
object: 'quest_list';
|
|
2172
|
+
quests: Quest[];
|
|
2173
|
+
completedToday: number;
|
|
2174
|
+
totalQuests: number;
|
|
2175
|
+
allComplete: boolean;
|
|
2176
|
+
completionBonus: {
|
|
2177
|
+
xp: number;
|
|
2178
|
+
gold: number;
|
|
2179
|
+
} | null;
|
|
2180
|
+
resetsAt: string;
|
|
2181
|
+
}
|
|
2182
|
+
/** Completed quests grouped by day. */
|
|
2183
|
+
interface QuestHistory {
|
|
2184
|
+
object: 'quest_history';
|
|
2185
|
+
history: Array<{
|
|
2186
|
+
date: string;
|
|
2187
|
+
quests: Array<Pick<Quest, 'questId' | 'name' | 'difficulty' | 'xpReward' | 'goldReward'> & {
|
|
2188
|
+
completedAt: string;
|
|
2189
|
+
}>;
|
|
2190
|
+
completedCount: number;
|
|
2191
|
+
}>;
|
|
2192
|
+
totalCompleted: number;
|
|
2193
|
+
}
|
|
2194
|
+
interface QuestHistoryParams {
|
|
2195
|
+
userId?: string;
|
|
2196
|
+
/** Number of completed quests to load, maximum 90. */
|
|
2197
|
+
limit?: number;
|
|
2160
2198
|
}
|
|
2161
2199
|
/** A daily puzzle. */
|
|
2162
2200
|
interface Puzzle {
|
|
@@ -2171,15 +2209,59 @@ interface Puzzle {
|
|
|
2171
2209
|
/** Puzzle completion parameters. */
|
|
2172
2210
|
interface PuzzleCompleteParams {
|
|
2173
2211
|
userId: string;
|
|
2174
|
-
|
|
2212
|
+
puzzleId: string;
|
|
2213
|
+
timeSeconds: number;
|
|
2214
|
+
mistakes?: number;
|
|
2215
|
+
isWon?: boolean;
|
|
2175
2216
|
}
|
|
2176
2217
|
/** Puzzle completion result. */
|
|
2177
2218
|
interface PuzzleCompleteResult {
|
|
2178
|
-
object: '
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2219
|
+
object: 'puzzle_completion';
|
|
2220
|
+
id: string;
|
|
2221
|
+
puzzleId: string;
|
|
2222
|
+
timeSeconds: number;
|
|
2223
|
+
mistakes: number;
|
|
2224
|
+
score: number;
|
|
2225
|
+
xpEarned: number;
|
|
2226
|
+
isWon: boolean;
|
|
2227
|
+
streak: {
|
|
2228
|
+
current: number;
|
|
2229
|
+
longest: number;
|
|
2230
|
+
totalCompleted: number;
|
|
2231
|
+
};
|
|
2182
2232
|
}
|
|
2233
|
+
/** Scoreboards need a puzzle ID; streak boards are team-wide. */
|
|
2234
|
+
type PuzzleLeaderboardParams = {
|
|
2235
|
+
type?: 'scores';
|
|
2236
|
+
puzzleId: string;
|
|
2237
|
+
limit?: number;
|
|
2238
|
+
} | {
|
|
2239
|
+
type: 'streaks';
|
|
2240
|
+
limit?: number;
|
|
2241
|
+
};
|
|
2242
|
+
type PuzzleLeaderboardResult = {
|
|
2243
|
+
object: 'puzzle_leaderboard';
|
|
2244
|
+
type: 'scores';
|
|
2245
|
+
puzzleId: string;
|
|
2246
|
+
entries: Array<{
|
|
2247
|
+
rank: number;
|
|
2248
|
+
userId: string;
|
|
2249
|
+
timeSeconds: number;
|
|
2250
|
+
mistakes: number;
|
|
2251
|
+
score: number;
|
|
2252
|
+
xpEarned: number;
|
|
2253
|
+
}>;
|
|
2254
|
+
} | {
|
|
2255
|
+
object: 'puzzle_leaderboard';
|
|
2256
|
+
type: 'streaks';
|
|
2257
|
+
entries: Array<{
|
|
2258
|
+
rank: number;
|
|
2259
|
+
userId: string;
|
|
2260
|
+
currentStreak: number;
|
|
2261
|
+
longestStreak: number;
|
|
2262
|
+
totalCompleted: number;
|
|
2263
|
+
}>;
|
|
2264
|
+
};
|
|
2183
2265
|
/** Puzzle streak info. */
|
|
2184
2266
|
interface PuzzleStreak {
|
|
2185
2267
|
object: 'puzzle_streak';
|
|
@@ -2192,22 +2274,39 @@ interface PuzzleStreak {
|
|
|
2192
2274
|
interface OneUp {
|
|
2193
2275
|
id: string;
|
|
2194
2276
|
object: 'one_up';
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2277
|
+
sender: {
|
|
2278
|
+
id: string;
|
|
2279
|
+
name: string | null;
|
|
2280
|
+
};
|
|
2281
|
+
recipient: {
|
|
2282
|
+
id: string;
|
|
2283
|
+
name: string | null;
|
|
2284
|
+
};
|
|
2199
2285
|
message: string | null;
|
|
2286
|
+
goldAmount: number;
|
|
2287
|
+
wasFree: boolean;
|
|
2200
2288
|
createdAt: string;
|
|
2201
2289
|
}
|
|
2290
|
+
/** Sending a one-up also returns the remaining allowance and rewards. */
|
|
2291
|
+
interface OneUpSendResult extends OneUp {
|
|
2292
|
+
freeRemaining: number;
|
|
2293
|
+
recipientXpAwarded: number;
|
|
2294
|
+
recipientGoldAwarded: number;
|
|
2295
|
+
}
|
|
2202
2296
|
/** Parameters for listing one-ups. */
|
|
2203
|
-
interface OneUpListParams
|
|
2297
|
+
interface OneUpListParams {
|
|
2204
2298
|
userId?: string;
|
|
2299
|
+
limit?: number;
|
|
2205
2300
|
}
|
|
2206
2301
|
/** Parameters for sending a one-up. */
|
|
2207
2302
|
interface OneUpCreateParams {
|
|
2303
|
+
/** Defaults to the API key's creator. */
|
|
2304
|
+
senderId?: string;
|
|
2305
|
+
senderName?: string;
|
|
2208
2306
|
recipientId: string;
|
|
2307
|
+
recipientName?: string;
|
|
2209
2308
|
message?: string;
|
|
2210
|
-
|
|
2309
|
+
goldAmount?: number;
|
|
2211
2310
|
}
|
|
2212
2311
|
/** Remaining one-ups info. */
|
|
2213
2312
|
interface OneUpRemaining {
|
|
@@ -2220,23 +2319,34 @@ interface OneUpRemaining {
|
|
|
2220
2319
|
interface HighFive {
|
|
2221
2320
|
id: string;
|
|
2222
2321
|
object: 'high_five';
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2322
|
+
senderTeam: {
|
|
2323
|
+
id: string;
|
|
2324
|
+
name: string | null;
|
|
2325
|
+
};
|
|
2326
|
+
senderUser: {
|
|
2327
|
+
id: string;
|
|
2328
|
+
name: string | null;
|
|
2329
|
+
};
|
|
2330
|
+
recipientTeam: {
|
|
2331
|
+
id: string;
|
|
2332
|
+
name: string | null;
|
|
2333
|
+
};
|
|
2229
2334
|
message: string | null;
|
|
2230
2335
|
createdAt: string;
|
|
2231
2336
|
}
|
|
2232
2337
|
/** Parameters for listing high fives. */
|
|
2233
|
-
interface HighFiveListParams
|
|
2338
|
+
interface HighFiveListParams {
|
|
2339
|
+
limit?: number;
|
|
2234
2340
|
}
|
|
2235
2341
|
/** Parameters for sending a high five. */
|
|
2236
2342
|
interface HighFiveCreateParams {
|
|
2237
2343
|
recipientTeamId: string;
|
|
2344
|
+
recipientTeamName?: string;
|
|
2345
|
+
/** Defaults to the API key's creator. */
|
|
2346
|
+
senderUserId?: string;
|
|
2347
|
+
senderUserName?: string;
|
|
2348
|
+
senderTeamName?: string;
|
|
2238
2349
|
message?: string;
|
|
2239
|
-
userId: string;
|
|
2240
2350
|
}
|
|
2241
2351
|
/** Can-send check result. */
|
|
2242
2352
|
interface HighFiveCanSend {
|
|
@@ -2249,10 +2359,13 @@ interface Cosmetic {
|
|
|
2249
2359
|
id: string;
|
|
2250
2360
|
object: 'cosmetic';
|
|
2251
2361
|
type: string;
|
|
2252
|
-
|
|
2253
|
-
rarity: string | null;
|
|
2362
|
+
seasonId: string | null;
|
|
2254
2363
|
unlockedAt: string;
|
|
2255
2364
|
}
|
|
2365
|
+
interface CosmeticListParams {
|
|
2366
|
+
userId: string;
|
|
2367
|
+
type?: string;
|
|
2368
|
+
}
|
|
2256
2369
|
/** Cosmetic preferences. */
|
|
2257
2370
|
interface CosmeticPreferences {
|
|
2258
2371
|
object: 'cosmetic_preferences';
|
|
@@ -2262,13 +2375,28 @@ interface CosmeticPreferences {
|
|
|
2262
2375
|
interface Season {
|
|
2263
2376
|
id: string;
|
|
2264
2377
|
object: 'season';
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
daysRemaining: number | null;
|
|
2378
|
+
isActive: boolean;
|
|
2379
|
+
startsAt: string;
|
|
2380
|
+
endsAt: string;
|
|
2381
|
+
daysRemaining: number;
|
|
2382
|
+
createdAt: string;
|
|
2271
2383
|
}
|
|
2384
|
+
/** The current-season endpoint includes team details or a no-season state. */
|
|
2385
|
+
type CurrentSeason = {
|
|
2386
|
+
object: 'season';
|
|
2387
|
+
active: false;
|
|
2388
|
+
season: null;
|
|
2389
|
+
} | (Season & {
|
|
2390
|
+
isActive: true;
|
|
2391
|
+
name: string | null;
|
|
2392
|
+
number: number | null;
|
|
2393
|
+
badges: Array<{
|
|
2394
|
+
level: number;
|
|
2395
|
+
name: string;
|
|
2396
|
+
color: string;
|
|
2397
|
+
}>;
|
|
2398
|
+
teamParticipants: number;
|
|
2399
|
+
});
|
|
2272
2400
|
/** Season stats for a user. */
|
|
2273
2401
|
interface SeasonStats {
|
|
2274
2402
|
object: 'season_stats';
|
|
@@ -2400,13 +2528,9 @@ declare class QuestsResource {
|
|
|
2400
2528
|
/** Get today's quests. */
|
|
2401
2529
|
today(params?: {
|
|
2402
2530
|
userId?: string;
|
|
2403
|
-
}): Promise<ApiResponse<
|
|
2531
|
+
}): Promise<ApiResponse<QuestList>>;
|
|
2404
2532
|
/** Get quest history. */
|
|
2405
|
-
history(params?:
|
|
2406
|
-
userId?: string;
|
|
2407
|
-
page?: number;
|
|
2408
|
-
pageSize?: number;
|
|
2409
|
-
}): Promise<ApiResponse<unknown>>;
|
|
2533
|
+
history(params?: QuestHistoryParams): Promise<ApiResponse<QuestHistory>>;
|
|
2410
2534
|
}
|
|
2411
2535
|
declare class PuzzlesResource {
|
|
2412
2536
|
private readonly client;
|
|
@@ -2415,25 +2539,25 @@ declare class PuzzlesResource {
|
|
|
2415
2539
|
today(params?: {
|
|
2416
2540
|
userId?: string;
|
|
2417
2541
|
}): Promise<ApiResponse<Puzzle>>;
|
|
2418
|
-
/**
|
|
2542
|
+
/** Record a completed puzzle, its timing and result. */
|
|
2419
2543
|
complete(params: PuzzleCompleteParams, options?: RequestOptions): Promise<ApiResponse<PuzzleCompleteResult>>;
|
|
2420
2544
|
/** Get puzzle streak for a user. */
|
|
2421
2545
|
streak(params: {
|
|
2422
2546
|
userId: string;
|
|
2423
2547
|
}): Promise<ApiResponse<PuzzleStreak>>;
|
|
2424
2548
|
/** Get puzzle leaderboard. */
|
|
2425
|
-
leaderboard(params
|
|
2426
|
-
type?: 'scores' | 'streaks';
|
|
2427
|
-
limit?: number;
|
|
2428
|
-
}): Promise<ApiResponse<unknown>>;
|
|
2549
|
+
leaderboard(params: PuzzleLeaderboardParams): Promise<ApiResponse<PuzzleLeaderboardResult>>;
|
|
2429
2550
|
}
|
|
2430
2551
|
declare class OneUpsResource {
|
|
2431
2552
|
private readonly client;
|
|
2432
2553
|
constructor(client: HttpClient);
|
|
2433
2554
|
/** List one-ups. */
|
|
2434
|
-
list(params?: OneUpListParams): Promise<
|
|
2555
|
+
list(params?: OneUpListParams): Promise<ApiResponse<{
|
|
2556
|
+
object: 'list';
|
|
2557
|
+
data: OneUp[];
|
|
2558
|
+
}>>;
|
|
2435
2559
|
/** Send a one-up. */
|
|
2436
|
-
send(params: OneUpCreateParams, options?: RequestOptions): Promise<ApiResponse<
|
|
2560
|
+
send(params: OneUpCreateParams, options?: RequestOptions): Promise<ApiResponse<OneUpSendResult>>;
|
|
2437
2561
|
/** Check remaining free one-ups today. */
|
|
2438
2562
|
remaining(params: {
|
|
2439
2563
|
userId: string;
|
|
@@ -2443,7 +2567,10 @@ declare class HighFivesResource {
|
|
|
2443
2567
|
private readonly client;
|
|
2444
2568
|
constructor(client: HttpClient);
|
|
2445
2569
|
/** List high fives. */
|
|
2446
|
-
list(params?: HighFiveListParams): Promise<
|
|
2570
|
+
list(params?: HighFiveListParams): Promise<ApiResponse<{
|
|
2571
|
+
object: 'list';
|
|
2572
|
+
data: HighFive[];
|
|
2573
|
+
}>>;
|
|
2447
2574
|
/** Send a high five. */
|
|
2448
2575
|
send(params: HighFiveCreateParams, options?: RequestOptions): Promise<ApiResponse<HighFive>>;
|
|
2449
2576
|
/** Check if you can send a high five to a team. */
|
|
@@ -2455,9 +2582,7 @@ declare class CosmeticsResource {
|
|
|
2455
2582
|
private readonly client;
|
|
2456
2583
|
constructor(client: HttpClient);
|
|
2457
2584
|
/** List unlocked cosmetics. */
|
|
2458
|
-
list(params
|
|
2459
|
-
userId?: string;
|
|
2460
|
-
}): Promise<ApiResponse<Cosmetic[]>>;
|
|
2585
|
+
list(params: CosmeticListParams): Promise<ListResponse<Cosmetic>>;
|
|
2461
2586
|
/** Get cosmetic preferences. */
|
|
2462
2587
|
getPreferences(params: {
|
|
2463
2588
|
userId: string;
|
|
@@ -2469,9 +2594,11 @@ declare class SeasonsResource {
|
|
|
2469
2594
|
private readonly client;
|
|
2470
2595
|
constructor(client: HttpClient);
|
|
2471
2596
|
/** List all seasons. */
|
|
2472
|
-
list(
|
|
2597
|
+
list(params?: {
|
|
2598
|
+
limit?: number;
|
|
2599
|
+
}): Promise<ListResponse<Season>>;
|
|
2473
2600
|
/** Get the current active season. */
|
|
2474
|
-
current(): Promise<ApiResponse<
|
|
2601
|
+
current(): Promise<ApiResponse<CurrentSeason>>;
|
|
2475
2602
|
/** Get user stats for a season. */
|
|
2476
2603
|
stats(seasonId: string, params: {
|
|
2477
2604
|
userId: string;
|
|
@@ -2910,4 +3037,4 @@ declare class CStarClient {
|
|
|
2910
3037
|
get lastMeta(): LastMeta;
|
|
2911
3038
|
}
|
|
2912
3039
|
|
|
2913
|
-
export { type Achievement, type AchievementListParams, type ActivityEvent, type ActivityListParams, type AiAction, type AiActionParams, type AiActionResult, type AnalyticsOverview, type AnalyticsParams, type ApiResponse, type Article, type ArticleCreateParams, type ArticleListParams, type ArticleUpdateParams, type Attachment, type AttachmentListParams, type AuditLogEntry, type AuditLogListParams, type AutomationAction, type AutomationCondition, type AutomationConditions, type AutomationCreateParams, type AutomationExecution, type AutomationExecutionListParams, type AutomationListParams, type AutomationRule, type AutomationTestResult, type AutomationUpdateParams, type BillingPortal, type BillingPortalParams, type Boss, type BossDamageParams, type BossDamageResult, type BossDefeat, type BossDefeatListParams, type BossSpawnParams, type BulkDeleteParams, type BulkResult, type BulkUpdateParams, type BusinessHours, type BusinessHoursUpdateParams, CStarClient, type CStarClientConfig, CStarRealtime, type Category, type CategoryCreateParams, type CategoryListParams, type CategoryUpdateParams, type CommunityComment, type CommunityCommentCreateParams, type CommunityPost, type CommunityPostCreateParams, type CommunityPostListParams, type CommunityPostUpdateParams, type CommunityTopic, type ConnectionHandler, type Cosmetic, type CosmeticPreferences, type CsatSettings, type CsatSettingsUpdateParams, type CsatStats, type CsatSurvey, type CsatSurveyCreateParams, type CsatSurveyListParams, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerGroup, type CustomerGroupAddMembersParams, type CustomerGroupAddResult, type CustomerGroupCreateParams, type CustomerGroupListParams, type CustomerGroupMemberListParams, type CustomerGroupMembersResult, type CustomerGroupRemoveResult, type CustomerGroupUpdateParams, type CustomerListParams, type CustomerUpdateParams, type DeleteResponse, type ErrorHandler, type EventHandler, type ExportCreateParams, type ExportResult, type GameConfig, type HighFive, type HighFiveCanSend, type HighFiveCreateParams, type HighFiveListParams, type ImportCreateParams, type ImportLog, type ImportLogListParams, type ImportResult, type Invite, type InviteCreateParams, type InviteListParams, type LeaderboardEntry, type LeaderboardParams, type ListResponse, type Member, type MemberListParams, type MemberUpdateParams, type Mention, type MentionListParams, type MentionUnreadCount, type Message, type MessageCreateParams, type Metadata, type Notification, type NotificationListParams, OfflineQueue, type OfflineQueueOptions, type OneUp, type OneUpCreateParams, type OneUpListParams, type OneUpRemaining, type PaginationInfo, type PaginationParams, type Player, type Puzzle, type PuzzleCompleteParams, type PuzzleCompleteResult, type PuzzleStreak, type Quest, type QueueItem, type QueueResult, type QuickReply, type QuickReplyCreateParams, type QuickReplyUpdateParams, type RealtimeEvent, type RealtimeOptions, type RequestOptions, type SavedView, type SearchParams, type SearchResult, type Season, type SeasonStats, type SkillAllocateParams, type SkillAllocateResult, type SkillTree, type SlaMetrics, type SlaMetricsParams, type SlaRule, type SlaRuleCreateParams, type SlaRuleListParams, type SlaRuleUpdateParams, type StatusCreateParams, type StatusUpdateParams, Subscription$1 as Subscription, type Tag, type TagListParams, type TeamSettings, type TeamSettingsUpdateParams, type Ticket, type TicketCreateParams, type TicketCustomerSummary, type TicketListParams, type TicketStatus, type TicketUpdateParams, type TopicCustomField, type UnreadCount, type ViewCreateParams, type ViewExecuteParams, type ViewListParams, type ViewUpdateParams, type Webhook, type WebhookCreateParams, type WebhookEventData, WebhookEventType, type WebhookListParams, type WebhookListener, type WebhookListenerParams, type WebhookSubscribeParams, type WebhookSubscription, type WebhookTestResult, type WebhookTriggerTestParams, type WebhookTriggerTestResult, type WebhookUpdateParams, type WidgetSettings, type WidgetSettingsUpdateParams };
|
|
3040
|
+
export { type Achievement, type AchievementListParams, type ActivityEvent, type ActivityListParams, type AiAction, type AiActionParams, type AiActionResult, type AnalyticsOverview, type AnalyticsParams, type ApiResponse, type Article, type ArticleCreateParams, type ArticleListParams, type ArticleUpdateParams, type Attachment, type AttachmentListParams, type AuditLogEntry, type AuditLogListParams, type AutomationAction, type AutomationCondition, type AutomationConditions, type AutomationCreateParams, type AutomationExecution, type AutomationExecutionListParams, type AutomationListParams, type AutomationRule, type AutomationTestResult, type AutomationUpdateParams, type BillingPortal, type BillingPortalParams, type Boss, type BossDamageParams, type BossDamageResult, type BossDefeat, type BossDefeatListParams, type BossSpawnParams, type BulkDeleteParams, type BulkResult, type BulkUpdateParams, type BusinessHours, type BusinessHoursUpdateParams, CStarClient, type CStarClientConfig, CStarRealtime, type Category, type CategoryCreateParams, type CategoryListParams, type CategoryUpdateParams, type CommunityComment, type CommunityCommentCreateParams, type CommunityPost, type CommunityPostCreateParams, type CommunityPostListParams, type CommunityPostUpdateParams, type CommunityTopic, type ConnectionHandler, type Cosmetic, type CosmeticListParams, type CosmeticPreferences, type CsatSettings, type CsatSettingsUpdateParams, type CsatStats, type CsatSurvey, type CsatSurveyCreateParams, type CsatSurveyListParams, type CurrentSeason, type CustomField, type CustomFieldCreateParams, type CustomFieldListParams, type CustomFieldUpdateParams, type Customer, type CustomerCreateParams, type CustomerGroup, type CustomerGroupAddMembersParams, type CustomerGroupAddResult, type CustomerGroupCreateParams, type CustomerGroupListParams, type CustomerGroupMemberListParams, type CustomerGroupMembersResult, type CustomerGroupRemoveResult, type CustomerGroupUpdateParams, type CustomerListParams, type CustomerUpdateParams, type DeleteResponse, type ErrorHandler, type EventHandler, type ExportCreateParams, type ExportResult, type GameConfig, type HighFive, type HighFiveCanSend, type HighFiveCreateParams, type HighFiveListParams, type ImportCreateParams, type ImportLog, type ImportLogListParams, type ImportResult, type Invite, type InviteCreateParams, type InviteListParams, type LeaderboardEntry, type LeaderboardParams, type ListResponse, type Member, type MemberListParams, type MemberUpdateParams, type Mention, type MentionListParams, type MentionUnreadCount, type Message, type MessageCreateParams, type Metadata, type Notification, type NotificationListParams, OfflineQueue, type OfflineQueueOptions, type OneUp, type OneUpCreateParams, type OneUpListParams, type OneUpRemaining, type OneUpSendResult, type PaginationInfo, type PaginationParams, type Player, type Puzzle, type PuzzleCompleteParams, type PuzzleCompleteResult, type PuzzleLeaderboardParams, type PuzzleLeaderboardResult, type PuzzleStreak, type Quest, type QuestHistory, type QuestHistoryParams, type QuestList, type QueueItem, type QueueResult, type QuickReply, type QuickReplyCreateParams, type QuickReplyUpdateParams, type RealtimeEvent, type RealtimeOptions, type RequestOptions, type SavedView, type SearchParams, type SearchResult, type Season, type SeasonStats, type SkillAllocateParams, type SkillAllocateResult, type SkillTree, type SlaMetrics, type SlaMetricsParams, type SlaRule, type SlaRuleCreateParams, type SlaRuleListParams, type SlaRuleUpdateParams, type StatusCreateParams, type StatusUpdateParams, Subscription$1 as Subscription, type Tag, type TagListParams, type TeamSettings, type TeamSettingsUpdateParams, type Ticket, type TicketCreateParams, type TicketCustomerSummary, type TicketListParams, type TicketStatus, type TicketUpdateParams, type TopicCustomField, type UnreadCount, type ViewCreateParams, type ViewExecuteParams, type ViewListParams, type ViewUpdateParams, type Webhook, type WebhookCreateParams, type WebhookEventData, WebhookEventType, type WebhookListParams, type WebhookListener, type WebhookListenerParams, type WebhookSubscribeParams, type WebhookSubscription, type WebhookTestResult, type WebhookTriggerTestParams, type WebhookTriggerTestResult, type WebhookUpdateParams, type WidgetSettings, type WidgetSettingsUpdateParams };
|