@metatrongg/sdk 0.8.0-dev.09aec63
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/LICENSE +1 -0
- package/README.md +229 -0
- package/dist/browser/index.d.ts +4281 -0
- package/dist/browser/index.js +1 -0
- package/dist/contracts/index.d.ts +27997 -0
- package/dist/contracts/index.js +1 -0
- package/dist/index.d.ts +157 -0
- package/dist/index.js +1 -0
- package/dist/node/index.d.ts +4613 -0
- package/dist/node/index.js +1 -0
- package/dist/react/index.d.ts +27 -0
- package/dist/react/index.js +1 -0
- package/dist/webhook/express.d.ts +62 -0
- package/dist/webhook/express.js +1 -0
- package/dist/webhook/fastify.d.ts +61 -0
- package/dist/webhook/fastify.js +1 -0
- package/dist/webhook/hono.d.ts +57 -0
- package/dist/webhook/hono.js +1 -0
- package/dist/webhook/index.d.ts +59 -0
- package/dist/webhook/index.js +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,4613 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/core/dedup.d.ts
|
|
4
|
+
type InflightDedup = {
|
|
5
|
+
readonly run: <T>(key: string, function_: () => Promise<T>) => Promise<T>;
|
|
6
|
+
};
|
|
7
|
+
declare function createInflightDedup(): InflightDedup;
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/core/rate-limit.d.ts
|
|
10
|
+
declare const SERVER_RATE_LIMIT_WINDOW_MS = 60000;
|
|
11
|
+
declare const SERVER_RATE_LIMIT_MAX_READ = 60;
|
|
12
|
+
declare const SERVER_RATE_LIMIT_MAX_MUTATING = 5;
|
|
13
|
+
type RateLimiter = {
|
|
14
|
+
/** Resolves when the caller may proceed (a token for this method class was consumed). */readonly acquire: (method: string) => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
type RateLimitOptions = {
|
|
17
|
+
/** Override the read (GET/HEAD) bucket. Defaults mirror the server: 60 / 60s. */readonly read?: {
|
|
18
|
+
requestsPerSecond?: number;
|
|
19
|
+
burst?: number;
|
|
20
|
+
}; /** Override the mutating (POST/PUT/PATCH/DELETE) bucket. Defaults mirror the server: 5 / 60s. */
|
|
21
|
+
readonly write?: {
|
|
22
|
+
requestsPerSecond?: number;
|
|
23
|
+
burst?: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
declare const NOOP_RATE_LIMITER: RateLimiter;
|
|
27
|
+
declare function createRateLimiter(options?: RateLimitOptions): RateLimiter;
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/core/types.d.ts
|
|
30
|
+
type OauthScope = "openid" | "profile" | "payments:charge" | "inventory:read";
|
|
31
|
+
type SdkBaseConfig = {
|
|
32
|
+
readonly issuer: string;
|
|
33
|
+
readonly logger?: Logger | undefined;
|
|
34
|
+
readonly fetch?: FetchLike | undefined;
|
|
35
|
+
readonly rateLimit?: RateLimitOptions | false | undefined;
|
|
36
|
+
readonly dedupe?: boolean | undefined;
|
|
37
|
+
};
|
|
38
|
+
type FetchLike = (input: string | URL | Request, init?: RequestInit) => Promise<Response>;
|
|
39
|
+
type BrowserClientConfig = SdkBaseConfig & {
|
|
40
|
+
readonly clientId: string;
|
|
41
|
+
readonly redirectUri: string;
|
|
42
|
+
readonly scopes: readonly OauthScope[];
|
|
43
|
+
readonly tokenStore?: TokenStore | undefined;
|
|
44
|
+
};
|
|
45
|
+
type NodeClientConfig = SdkBaseConfig & {
|
|
46
|
+
readonly clientId: string;
|
|
47
|
+
readonly clientSecret: string;
|
|
48
|
+
readonly tokenStore?: TokenStore | undefined;
|
|
49
|
+
};
|
|
50
|
+
type Logger = {
|
|
51
|
+
debug: (message: string, meta?: Record<string, unknown>) => void;
|
|
52
|
+
info: (message: string, meta?: Record<string, unknown>) => void;
|
|
53
|
+
warn: (message: string, meta?: Record<string, unknown>) => void;
|
|
54
|
+
error: (message: string, meta?: Record<string, unknown>) => void;
|
|
55
|
+
};
|
|
56
|
+
type TokenSet = {
|
|
57
|
+
readonly accessToken: string;
|
|
58
|
+
readonly refreshToken: string | null;
|
|
59
|
+
readonly expiresAt: number | null;
|
|
60
|
+
readonly scope: string | null;
|
|
61
|
+
readonly tokenType: string;
|
|
62
|
+
};
|
|
63
|
+
type TokenStore = {
|
|
64
|
+
get: (key: string) => Promise<TokenSet | null>;
|
|
65
|
+
set: (key: string, value: TokenSet) => Promise<void>;
|
|
66
|
+
clear: (key: string) => Promise<void>;
|
|
67
|
+
};
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/core/fetch.d.ts
|
|
70
|
+
type RequestOptions = {
|
|
71
|
+
readonly path: string;
|
|
72
|
+
readonly method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | undefined;
|
|
73
|
+
readonly query?: Record<string, string | number | readonly string[] | undefined> | undefined;
|
|
74
|
+
readonly body?: unknown;
|
|
75
|
+
readonly form?: Record<string, string> | undefined;
|
|
76
|
+
readonly bearer?: string | undefined;
|
|
77
|
+
readonly basicAuth?: {
|
|
78
|
+
username: string;
|
|
79
|
+
password: string;
|
|
80
|
+
} | undefined;
|
|
81
|
+
readonly idempotencyKey?: string | undefined;
|
|
82
|
+
readonly headers?: Record<string, string> | undefined;
|
|
83
|
+
readonly raw?: boolean | undefined;
|
|
84
|
+
};
|
|
85
|
+
type TransportContext = {
|
|
86
|
+
readonly issuer: string;
|
|
87
|
+
readonly fetch: FetchLike;
|
|
88
|
+
readonly logger: Logger;
|
|
89
|
+
readonly rateLimiter?: RateLimiter | undefined;
|
|
90
|
+
readonly dedupe?: InflightDedup | undefined;
|
|
91
|
+
};
|
|
92
|
+
declare function sendJson<T>(context: TransportContext, options: RequestOptions): Promise<T>;
|
|
93
|
+
declare function send(context: TransportContext, options: RequestOptions): Promise<Response>;
|
|
94
|
+
declare function parseJson<T>(response: Response): Promise<T>;
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/generated/types.gen.d.ts
|
|
97
|
+
type AuthUser = {
|
|
98
|
+
id: string;
|
|
99
|
+
email: string | null;
|
|
100
|
+
emailVerified: boolean;
|
|
101
|
+
name: Username;
|
|
102
|
+
displayName: DisplayName;
|
|
103
|
+
bio: Bio;
|
|
104
|
+
websiteUrl: WebsiteUrl;
|
|
105
|
+
image?: string | null;
|
|
106
|
+
banner: BannerVariant;
|
|
107
|
+
role: AdminRole;
|
|
108
|
+
presenceStatusMode: PresenceStatusMode;
|
|
109
|
+
environmentViewMode: PlatformEnvironment;
|
|
110
|
+
createdAt: string;
|
|
111
|
+
updatedAt: string;
|
|
112
|
+
};
|
|
113
|
+
type Username = string;
|
|
114
|
+
type DisplayName = string | null;
|
|
115
|
+
type Bio = string | null;
|
|
116
|
+
type WebsiteUrl = string | null;
|
|
117
|
+
type BannerVariant = "yellow" | "green" | "blue" | "white" | "black";
|
|
118
|
+
type AdminRole = "super-admin" | "admin" | "read-only" | null;
|
|
119
|
+
type PresenceStatusMode = "auto" | "online" | "offline";
|
|
120
|
+
type PlatformEnvironment = "development" | "production";
|
|
121
|
+
type OauthAuthorizationServerMetadata = {
|
|
122
|
+
issuer: string;
|
|
123
|
+
authorization_endpoint: string;
|
|
124
|
+
token_endpoint: string;
|
|
125
|
+
userinfo_endpoint: string;
|
|
126
|
+
revocation_endpoint: string;
|
|
127
|
+
registration_endpoint: string;
|
|
128
|
+
response_types_supported: Array<"code">;
|
|
129
|
+
grant_types_supported: Array<"authorization_code" | "refresh_token" | "client_credentials">;
|
|
130
|
+
code_challenge_methods_supported: Array<"S256">;
|
|
131
|
+
token_endpoint_auth_methods_supported: Array<"client_secret_basic" | "client_secret_post" | "none">;
|
|
132
|
+
scopes_supported: Array<"openid" | "profile" | "payments:charge" | "inventory:read" | "social:read" | "developer:read" | "developer:apps" | "developer:pages">;
|
|
133
|
+
};
|
|
134
|
+
type OauthClientRegistrationResponse = {
|
|
135
|
+
client_id: string;
|
|
136
|
+
client_id_issued_at: number;
|
|
137
|
+
client_name: string;
|
|
138
|
+
redirect_uris: Array<OauthRedirectUri>;
|
|
139
|
+
token_endpoint_auth_method: "none";
|
|
140
|
+
grant_types: Array<"authorization_code" | "refresh_token">;
|
|
141
|
+
response_types: Array<"code">;
|
|
142
|
+
scope: OauthScopeString;
|
|
143
|
+
};
|
|
144
|
+
type OauthRedirectUri = string;
|
|
145
|
+
type OauthScopeString = string;
|
|
146
|
+
type OauthClientRegistrationRequest = {
|
|
147
|
+
redirect_uris: Array<OauthRedirectUri>;
|
|
148
|
+
client_name?: string;
|
|
149
|
+
token_endpoint_auth_method?: "none";
|
|
150
|
+
grant_types?: Array<"authorization_code" | "refresh_token">;
|
|
151
|
+
response_types?: Array<"code">;
|
|
152
|
+
scope?: OauthScopeString;
|
|
153
|
+
};
|
|
154
|
+
type OauthState = string;
|
|
155
|
+
type OauthPaymentMonthlyLimitCents = number | null;
|
|
156
|
+
type OauthTokenResponse = {
|
|
157
|
+
access_token: string;
|
|
158
|
+
token_type: "Bearer";
|
|
159
|
+
expires_in: number;
|
|
160
|
+
refresh_token?: string;
|
|
161
|
+
scope?: OauthScopeString;
|
|
162
|
+
};
|
|
163
|
+
type OauthErrorResponse = {
|
|
164
|
+
error: "invalid_request" | "invalid_client" | "invalid_grant" | "unauthorized_client" | "unsupported_grant_type" | "unsupported_response_type" | "invalid_scope" | "access_denied" | "server_error" | "temporarily_unavailable" | "invalid_token" | "insufficient_scope";
|
|
165
|
+
error_description?: string;
|
|
166
|
+
error_uri?: string;
|
|
167
|
+
state?: OauthState;
|
|
168
|
+
};
|
|
169
|
+
type OauthUserInfoResponse = {
|
|
170
|
+
sub: string;
|
|
171
|
+
name: string | null;
|
|
172
|
+
preferred_username: string | null;
|
|
173
|
+
picture: string | null;
|
|
174
|
+
wallet_address: string | null;
|
|
175
|
+
};
|
|
176
|
+
type OauthPaymentChargeResponse = ({
|
|
177
|
+
status: "completed";
|
|
178
|
+
} & OauthPaymentChargeCompleted) | ({
|
|
179
|
+
status: "redirect";
|
|
180
|
+
} & OauthPaymentChargeRedirect);
|
|
181
|
+
type OauthPaymentChargeCompleted = {
|
|
182
|
+
status: "completed";
|
|
183
|
+
intentId: string;
|
|
184
|
+
paymentId: string;
|
|
185
|
+
usdCents: number;
|
|
186
|
+
txHash: string | null;
|
|
187
|
+
};
|
|
188
|
+
type OauthPaymentChargeRedirect = {
|
|
189
|
+
status: "redirect";
|
|
190
|
+
intentId: string;
|
|
191
|
+
redirectUrl: string;
|
|
192
|
+
usdCents: number;
|
|
193
|
+
};
|
|
194
|
+
type OauthPaymentChargeLimitExceeded = {
|
|
195
|
+
error: "monthly_limit_exceeded";
|
|
196
|
+
currentLimitCents: number;
|
|
197
|
+
monthSpentCents: number;
|
|
198
|
+
attemptedUsdCents: number;
|
|
199
|
+
redirectUrl: string;
|
|
200
|
+
};
|
|
201
|
+
type OauthPaymentChargeRequest = {
|
|
202
|
+
chain: string;
|
|
203
|
+
amount: string;
|
|
204
|
+
token: string;
|
|
205
|
+
returnUri: string;
|
|
206
|
+
potId?: string;
|
|
207
|
+
rakeBps?: number;
|
|
208
|
+
metadata?: PaymentMetadata;
|
|
209
|
+
};
|
|
210
|
+
type PaymentMetadata = {
|
|
211
|
+
purpose?: string;
|
|
212
|
+
title?: string;
|
|
213
|
+
note?: string;
|
|
214
|
+
quantity?: number;
|
|
215
|
+
category?: string;
|
|
216
|
+
sessionId?: string;
|
|
217
|
+
groupId?: string;
|
|
218
|
+
image?: string;
|
|
219
|
+
extra?: {
|
|
220
|
+
[key: string]: string | number | boolean;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
type OauthPaymentLimitsResponse = {
|
|
224
|
+
monthlyLimitCents: number | null;
|
|
225
|
+
monthSpentCents: number;
|
|
226
|
+
periodStart: string;
|
|
227
|
+
offlineAutoChargeEnabled: boolean;
|
|
228
|
+
perTxOfflineCapCents: number | null;
|
|
229
|
+
walletDelegated: boolean;
|
|
230
|
+
};
|
|
231
|
+
type OauthPaymentPriceResponse = {
|
|
232
|
+
chain: string;
|
|
233
|
+
token: string;
|
|
234
|
+
tokenDecimals: number;
|
|
235
|
+
usdRate: string;
|
|
236
|
+
feed: {
|
|
237
|
+
aggregatorAddress: string;
|
|
238
|
+
decimals: number;
|
|
239
|
+
answer: string;
|
|
240
|
+
updatedAt: string;
|
|
241
|
+
};
|
|
242
|
+
usdCents?: number;
|
|
243
|
+
amount?: string;
|
|
244
|
+
};
|
|
245
|
+
type OauthPaymentIntentStatus = {
|
|
246
|
+
intentId: string;
|
|
247
|
+
appId: string;
|
|
248
|
+
status: "pending" | "awaiting_funding" | "completed" | "denied" | "expired";
|
|
249
|
+
paymentId: string | null;
|
|
250
|
+
txHash: string | null;
|
|
251
|
+
usdCents: number;
|
|
252
|
+
chain: string;
|
|
253
|
+
token: string | null;
|
|
254
|
+
grossAmount: string | null;
|
|
255
|
+
creditedAmount: string | null;
|
|
256
|
+
settlement: "instant" | "locked" | null;
|
|
257
|
+
resolvedAt: string | null;
|
|
258
|
+
expiresAt: string;
|
|
259
|
+
};
|
|
260
|
+
type OauthPaymentIntentContext = {
|
|
261
|
+
intentId: string;
|
|
262
|
+
consentId: string;
|
|
263
|
+
app: {
|
|
264
|
+
id: string;
|
|
265
|
+
name: string;
|
|
266
|
+
logoUrl: string | null;
|
|
267
|
+
};
|
|
268
|
+
chain: string;
|
|
269
|
+
token: string;
|
|
270
|
+
amount: string;
|
|
271
|
+
vault: string;
|
|
272
|
+
appealable: boolean;
|
|
273
|
+
usdCents: number;
|
|
274
|
+
monthlyLimitCents: number | null;
|
|
275
|
+
monthSpentCents: number;
|
|
276
|
+
offlineAutoChargeEnabled: boolean;
|
|
277
|
+
perTxOfflineCapCents: number | null;
|
|
278
|
+
walletDelegated: boolean;
|
|
279
|
+
canonicalWalletAddress: string | null;
|
|
280
|
+
offlineDenialReason: "no_active_play_session" | "driver_unavailable" | "wallet_not_delegated" | "deposit_cap_exceeded" | "insufficient_balance" | "fire_failed" | null;
|
|
281
|
+
returnUriHost: string;
|
|
282
|
+
status: "pending" | "awaiting_funding";
|
|
283
|
+
expiresAt: string;
|
|
284
|
+
accessDenied?: {
|
|
285
|
+
reason: "not_invited";
|
|
286
|
+
developer: {
|
|
287
|
+
studioName: string | null;
|
|
288
|
+
logoUrl: string | null;
|
|
289
|
+
studioUrl: string | null;
|
|
290
|
+
studioXHandle: string | null;
|
|
291
|
+
};
|
|
292
|
+
} | null;
|
|
293
|
+
environment: "development" | "production";
|
|
294
|
+
};
|
|
295
|
+
type OauthPaymentIntentSignResponse = {
|
|
296
|
+
chain: string;
|
|
297
|
+
chainId: number;
|
|
298
|
+
id: string;
|
|
299
|
+
amount: string;
|
|
300
|
+
token: string;
|
|
301
|
+
vault: string;
|
|
302
|
+
data: string;
|
|
303
|
+
appealable: boolean;
|
|
304
|
+
payer: string;
|
|
305
|
+
deadline: number;
|
|
306
|
+
routerAddress: string;
|
|
307
|
+
signature: string;
|
|
308
|
+
};
|
|
309
|
+
type OauthPaymentIntentResolveResponse = {
|
|
310
|
+
redirect: string;
|
|
311
|
+
};
|
|
312
|
+
type OauthPaymentIntentComplete = ({
|
|
313
|
+
method: "signed";
|
|
314
|
+
} & OauthPaymentIntentCompleteSigned) | ({
|
|
315
|
+
method: "offline";
|
|
316
|
+
} & OauthPaymentIntentCompleteOffline);
|
|
317
|
+
type OauthPaymentIntentCompleteSigned = {
|
|
318
|
+
method: "signed";
|
|
319
|
+
paymentId: string;
|
|
320
|
+
};
|
|
321
|
+
type OauthPaymentIntentCompleteOffline = {
|
|
322
|
+
method: "offline";
|
|
323
|
+
};
|
|
324
|
+
type ListAppPaymentAuthorizationsResponse = {
|
|
325
|
+
authorizations: Array<AppPaymentAuthorizationItem>;
|
|
326
|
+
};
|
|
327
|
+
type AppPaymentAuthorizationItem = {
|
|
328
|
+
consentId: string;
|
|
329
|
+
app: {
|
|
330
|
+
id: string;
|
|
331
|
+
name: string;
|
|
332
|
+
logoUrl: string | null;
|
|
333
|
+
};
|
|
334
|
+
monthlyLimitCents: number | null;
|
|
335
|
+
monthSpentCents: number;
|
|
336
|
+
periodStart: string;
|
|
337
|
+
offlineAutoChargeEnabled: boolean;
|
|
338
|
+
perTxOfflineCapCents: number | null;
|
|
339
|
+
};
|
|
340
|
+
type UpdateAppPaymentAuthorization = {
|
|
341
|
+
offlineAutoChargeEnabled?: boolean;
|
|
342
|
+
perTxOfflineCapCents?: OauthPaymentPerTxLimitCents;
|
|
343
|
+
monthlyLimitCents?: OauthPaymentMonthlyLimitCents;
|
|
344
|
+
};
|
|
345
|
+
type OauthPaymentPerTxLimitCents = number | null;
|
|
346
|
+
type LibraryListResponse = {
|
|
347
|
+
items: Array<LibraryItem>;
|
|
348
|
+
nextBefore: string | null;
|
|
349
|
+
};
|
|
350
|
+
type LibraryItem = {
|
|
351
|
+
appId: string;
|
|
352
|
+
name: string;
|
|
353
|
+
slug: AppPageSlug;
|
|
354
|
+
bannerUrl: string | null;
|
|
355
|
+
thumbnailUrl: string | null;
|
|
356
|
+
thumbnailVideoUrl: string | null;
|
|
357
|
+
categories: Array<"adventure" | "battle_royale" | "board" | "cards" | "casino" | "casual" | "fighting" | "idle" | "mmo" | "moba" | "platformer" | "prediction" | "puzzle" | "racing" | "rhythm" | "roguelike" | "rpg" | "rts" | "sandbox" | "shooter" | "simulation" | "sports" | "strategy" | "survival" | "tools" | "tower_defense" | "visual_novel" | "other">;
|
|
358
|
+
studio: {
|
|
359
|
+
name: string | null;
|
|
360
|
+
logoUrl: string | null;
|
|
361
|
+
} | null;
|
|
362
|
+
firstPublishedAt: string;
|
|
363
|
+
};
|
|
364
|
+
type AppPageSlug = string;
|
|
365
|
+
type PublicAppPage = {
|
|
366
|
+
appId: string;
|
|
367
|
+
slug: AppPageSlug;
|
|
368
|
+
appName: string;
|
|
369
|
+
appLogoUrl: string | null;
|
|
370
|
+
categories: AppPageCategories;
|
|
371
|
+
tagline: AppPageTagline;
|
|
372
|
+
bannerUrl: string | null;
|
|
373
|
+
playUrl: string | null;
|
|
374
|
+
discordUrl: string | null;
|
|
375
|
+
twitterUrl: string | null;
|
|
376
|
+
redditUrl: string | null;
|
|
377
|
+
telegramUrl: string | null;
|
|
378
|
+
gallery: AppPageGallery;
|
|
379
|
+
chapters: AppPageChapters;
|
|
380
|
+
links: AppPageLinks;
|
|
381
|
+
studio: PublicAppPageStudio;
|
|
382
|
+
platforms: AppPagePlatforms;
|
|
383
|
+
gameType: AppPageGameType;
|
|
384
|
+
ageRating: AppPageAgeRating;
|
|
385
|
+
languages: AppPageLanguages;
|
|
386
|
+
releaseStatus: AppPageReleaseStatus;
|
|
387
|
+
paymentsMode: AppPagePaymentsMode;
|
|
388
|
+
oauthScopes: Array<string>;
|
|
389
|
+
chains: Array<string>;
|
|
390
|
+
publishedAt: string;
|
|
391
|
+
updatedAt: string;
|
|
392
|
+
};
|
|
393
|
+
type AppPageCategories = Array<"adventure" | "battle_royale" | "board" | "cards" | "casino" | "casual" | "fighting" | "idle" | "mmo" | "moba" | "platformer" | "prediction" | "puzzle" | "racing" | "rhythm" | "roguelike" | "rpg" | "rts" | "sandbox" | "shooter" | "simulation" | "sports" | "strategy" | "survival" | "tools" | "tower_defense" | "visual_novel" | "other">;
|
|
394
|
+
type AppPageTagline = string;
|
|
395
|
+
type AppPageGallery = Array<AppPageGalleryItem>;
|
|
396
|
+
type AppPageGalleryItem = {
|
|
397
|
+
url: string;
|
|
398
|
+
caption?: string;
|
|
399
|
+
order: number;
|
|
400
|
+
};
|
|
401
|
+
type AppPageChapters = Array<AppPageChapter>;
|
|
402
|
+
type AppPageChapter = {
|
|
403
|
+
heading: string;
|
|
404
|
+
body: string;
|
|
405
|
+
order: number;
|
|
406
|
+
};
|
|
407
|
+
type AppPageLinks = Array<AppPageLink>;
|
|
408
|
+
type AppPageLink = {
|
|
409
|
+
label: string;
|
|
410
|
+
url: string;
|
|
411
|
+
order: number;
|
|
412
|
+
};
|
|
413
|
+
type PublicAppPageStudio = {
|
|
414
|
+
ownerUserId: string | null;
|
|
415
|
+
name: string | null;
|
|
416
|
+
logoUrl: string | null;
|
|
417
|
+
websiteUrl: string | null;
|
|
418
|
+
xHandle: string | null;
|
|
419
|
+
githubUrl: string | null;
|
|
420
|
+
};
|
|
421
|
+
type AppPagePlatforms = Array<"web" | "ios" | "android" | "pc" | "playstation" | "xbox" | "switch">;
|
|
422
|
+
type AppPageGameType = "single_player" | "multiplayer" | "both" | null;
|
|
423
|
+
type AppPageAgeRating = "everyone" | "13_plus" | "16_plus" | "18_plus" | null;
|
|
424
|
+
type AppPageLanguages = Array<"en" | "es" | "fr" | "de" | "pt" | "it" | "ru" | "ja" | "ko" | "zh" | "hi" | "ar" | "tr" | "vi" | "id" | "th" | "pl" | "nl">;
|
|
425
|
+
type AppPageReleaseStatus = "live" | "open_beta" | "coming_soon";
|
|
426
|
+
type AppPagePaymentsMode = "tron" | "onchain" | "both" | null;
|
|
427
|
+
type ReviewListResponse = {
|
|
428
|
+
aggregate: ReviewAggregate;
|
|
429
|
+
reviews: Array<Review>;
|
|
430
|
+
total: number;
|
|
431
|
+
hasMore: boolean;
|
|
432
|
+
};
|
|
433
|
+
type ReviewAggregate = {
|
|
434
|
+
count: number;
|
|
435
|
+
recommendedCount: number;
|
|
436
|
+
recommendedPct: number | null;
|
|
437
|
+
summaryLabel: ReviewSummaryLabel;
|
|
438
|
+
};
|
|
439
|
+
type ReviewSummaryLabel = "overwhelmingly_positive" | "very_positive" | "positive" | "mostly_positive" | "mixed" | "mostly_negative" | "negative" | "overwhelmingly_negative" | null;
|
|
440
|
+
type Review = {
|
|
441
|
+
id: string;
|
|
442
|
+
recommended: ReviewRecommended;
|
|
443
|
+
body: ReviewBody;
|
|
444
|
+
reactions: ReviewReactionCounts;
|
|
445
|
+
tippedCents: number;
|
|
446
|
+
commentCount: number;
|
|
447
|
+
author: ReviewAuthor;
|
|
448
|
+
authorStats: ReviewerStats;
|
|
449
|
+
developerReply: ReviewReply;
|
|
450
|
+
createdAt: string;
|
|
451
|
+
updatedAt: string;
|
|
452
|
+
};
|
|
453
|
+
type ReviewRecommended = boolean;
|
|
454
|
+
type ReviewBody = string;
|
|
455
|
+
type ReviewReactionCounts = {
|
|
456
|
+
helpful: number;
|
|
457
|
+
unhelpful: number;
|
|
458
|
+
funny: number;
|
|
459
|
+
};
|
|
460
|
+
type ReviewAuthor = {
|
|
461
|
+
userId: string;
|
|
462
|
+
handle: string | null;
|
|
463
|
+
name: string | null;
|
|
464
|
+
avatarUrl: string | null;
|
|
465
|
+
};
|
|
466
|
+
type ReviewerStats = {
|
|
467
|
+
playtimeSecondsThisGame: number;
|
|
468
|
+
gamesPlayed: number;
|
|
469
|
+
reviewsWritten: number;
|
|
470
|
+
};
|
|
471
|
+
type ReviewReply = {
|
|
472
|
+
body: ReviewReplyBody;
|
|
473
|
+
repliedAt: string;
|
|
474
|
+
} | null;
|
|
475
|
+
type ReviewReplyBody = string;
|
|
476
|
+
type ReviewSort = "newest" | "oldest" | "helpful";
|
|
477
|
+
type MyReviewResponse = {
|
|
478
|
+
eligible: boolean;
|
|
479
|
+
eligibleVia: ReviewEligibilityReason;
|
|
480
|
+
review: OwnReview;
|
|
481
|
+
isAppOwner: boolean;
|
|
482
|
+
};
|
|
483
|
+
type ReviewEligibilityReason = "payment" | "reward" | null;
|
|
484
|
+
type OwnReview = {
|
|
485
|
+
id: string;
|
|
486
|
+
recommended: ReviewRecommended;
|
|
487
|
+
body: ReviewBody;
|
|
488
|
+
createdAt: string;
|
|
489
|
+
updatedAt: string;
|
|
490
|
+
} | null;
|
|
491
|
+
type UpsertReviewRequest = {
|
|
492
|
+
recommended: ReviewRecommended;
|
|
493
|
+
body: ReviewBody;
|
|
494
|
+
};
|
|
495
|
+
type MyReviewReactionsResponse = {
|
|
496
|
+
reactions: Array<MyReviewReaction>;
|
|
497
|
+
};
|
|
498
|
+
type MyReviewReaction = {
|
|
499
|
+
reviewId: string;
|
|
500
|
+
vote: ReviewVote;
|
|
501
|
+
funny: boolean;
|
|
502
|
+
};
|
|
503
|
+
type ReviewVote = "helpful" | "unhelpful" | null;
|
|
504
|
+
type SetReviewReactionResponse = {
|
|
505
|
+
reactions: ReviewReactionCounts;
|
|
506
|
+
vote: ReviewVote;
|
|
507
|
+
funny: boolean;
|
|
508
|
+
};
|
|
509
|
+
type SetReviewReactionRequest = {
|
|
510
|
+
vote: ReviewVote;
|
|
511
|
+
funny: boolean;
|
|
512
|
+
};
|
|
513
|
+
type TipReviewResponse = {
|
|
514
|
+
status: "completed";
|
|
515
|
+
amountCents: number;
|
|
516
|
+
balanceCents: number;
|
|
517
|
+
tippedCents: number;
|
|
518
|
+
};
|
|
519
|
+
type TipReviewRequest = {
|
|
520
|
+
amountCents: number;
|
|
521
|
+
note?: string;
|
|
522
|
+
challengeId?: string;
|
|
523
|
+
signature?: string;
|
|
524
|
+
};
|
|
525
|
+
type ReviewCommentListResponse = {
|
|
526
|
+
comments: Array<ReviewComment>;
|
|
527
|
+
total: number;
|
|
528
|
+
hasMore: boolean;
|
|
529
|
+
};
|
|
530
|
+
type ReviewComment = {
|
|
531
|
+
id: string;
|
|
532
|
+
body: ReviewCommentBody;
|
|
533
|
+
author: ReviewAuthor;
|
|
534
|
+
createdAt: string;
|
|
535
|
+
};
|
|
536
|
+
type ReviewCommentBody = string;
|
|
537
|
+
type CreateReviewCommentResponse = {
|
|
538
|
+
comment: ReviewComment;
|
|
539
|
+
commentCount: number;
|
|
540
|
+
};
|
|
541
|
+
type CreateReviewCommentRequest = {
|
|
542
|
+
body: ReviewCommentBody;
|
|
543
|
+
};
|
|
544
|
+
type DeleteReviewCommentResponse = {
|
|
545
|
+
commentCount: number;
|
|
546
|
+
};
|
|
547
|
+
type ReviewReplyResponse = {
|
|
548
|
+
developerReply: ReviewReply;
|
|
549
|
+
};
|
|
550
|
+
type UpsertReviewReplyRequest = {
|
|
551
|
+
body: ReviewReplyBody;
|
|
552
|
+
};
|
|
553
|
+
type SubmitAppContentReportResponse = {
|
|
554
|
+
created: boolean;
|
|
555
|
+
};
|
|
556
|
+
type SubmitAppContentReportRequest = {
|
|
557
|
+
category: AppContentReportCategory;
|
|
558
|
+
details?: string;
|
|
559
|
+
};
|
|
560
|
+
type AppContentReportCategory = "abuse" | "inappropriate_content" | "cheating" | "spam" | "other";
|
|
561
|
+
type AppContentReportListResponse = {
|
|
562
|
+
reports: Array<AppContentReport>;
|
|
563
|
+
total: number;
|
|
564
|
+
hasMore: boolean;
|
|
565
|
+
};
|
|
566
|
+
type AppContentReport = {
|
|
567
|
+
id: string;
|
|
568
|
+
category: AppContentReportCategory;
|
|
569
|
+
details: string | null;
|
|
570
|
+
status: AppContentReportStatus;
|
|
571
|
+
acknowledgedAt: string | null;
|
|
572
|
+
createdAt: string;
|
|
573
|
+
};
|
|
574
|
+
type AppContentReportStatus = "open" | "acknowledged" | "dismissed";
|
|
575
|
+
type PaymentChainsResponse = {
|
|
576
|
+
chains: Array<PaymentChain>;
|
|
577
|
+
};
|
|
578
|
+
type PaymentChain = {
|
|
579
|
+
id: string;
|
|
580
|
+
family: "evm" | "solana";
|
|
581
|
+
displayName: string;
|
|
582
|
+
chainId?: number;
|
|
583
|
+
paymentRouter?: string;
|
|
584
|
+
paymentProgram?: string;
|
|
585
|
+
};
|
|
586
|
+
type PaymentHistoryResponse = {
|
|
587
|
+
payments: Array<PaymentHistoryRow>;
|
|
588
|
+
nextBefore: string | null;
|
|
589
|
+
};
|
|
590
|
+
type PaymentHistoryRow = {
|
|
591
|
+
id: string;
|
|
592
|
+
chain: string;
|
|
593
|
+
chainId: number;
|
|
594
|
+
payer: string;
|
|
595
|
+
amount: string;
|
|
596
|
+
token: string;
|
|
597
|
+
vault: string;
|
|
598
|
+
vaultKind: "credit" | "platform";
|
|
599
|
+
processorAddress: string | null;
|
|
600
|
+
grossAmount: string;
|
|
601
|
+
creditedAmount: string;
|
|
602
|
+
settlement: "instant" | "locked" | null;
|
|
603
|
+
appealable: boolean;
|
|
604
|
+
vaultReleaseAt: string | null;
|
|
605
|
+
consolidatedAt: string | null;
|
|
606
|
+
status: "pending" | "completed" | "expired";
|
|
607
|
+
txHash: string | null;
|
|
608
|
+
blockNumber: string | null;
|
|
609
|
+
deadline: string;
|
|
610
|
+
signedAt: string;
|
|
611
|
+
completedAt: string | null;
|
|
612
|
+
recipientApp: {
|
|
613
|
+
id: string;
|
|
614
|
+
name: string;
|
|
615
|
+
logoUrl: string | null;
|
|
616
|
+
} | null;
|
|
617
|
+
};
|
|
618
|
+
type ActivityResponse = {
|
|
619
|
+
rows: Array<ActivityRow>;
|
|
620
|
+
nextBefore: string | null;
|
|
621
|
+
nextCursor: string | null;
|
|
622
|
+
hasHidden: boolean;
|
|
623
|
+
};
|
|
624
|
+
type ActivityRow = ({
|
|
625
|
+
kind: "payment";
|
|
626
|
+
} & ActivityRowPayment) | ({
|
|
627
|
+
kind: "payment_withdrawal";
|
|
628
|
+
} & ActivityRowPaymentWithdrawal) | ({
|
|
629
|
+
kind: "matured_withdrawal";
|
|
630
|
+
} & ActivityRowMaturedWithdrawal) | ({
|
|
631
|
+
kind: "payout_sent";
|
|
632
|
+
} & ActivityRowPayoutSent) | ({
|
|
633
|
+
kind: "credit_transferred";
|
|
634
|
+
} & ActivityRowCreditTransferred) | ({
|
|
635
|
+
kind: "pot_leg";
|
|
636
|
+
} & ActivityRowPotLeg) | ({
|
|
637
|
+
kind: "payment_autoclaim";
|
|
638
|
+
} & ActivityRowPaymentAutoclaim) | ({
|
|
639
|
+
kind: "appeal";
|
|
640
|
+
} & ActivityRowAppeal) | ({
|
|
641
|
+
kind: "moonpay_buy";
|
|
642
|
+
} & ActivityRowMoonpayBuy) | ({
|
|
643
|
+
kind: "moonpay_sell";
|
|
644
|
+
} & ActivityRowMoonpaySell) | ({
|
|
645
|
+
kind: "tron_deposit";
|
|
646
|
+
} & ActivityRowTronDeposit) | ({
|
|
647
|
+
kind: "tron_pot";
|
|
648
|
+
} & ActivityRowTronPot) | ({
|
|
649
|
+
kind: "tron_cashout";
|
|
650
|
+
} & ActivityRowTronCashout) | ({
|
|
651
|
+
kind: "tron_transfer";
|
|
652
|
+
} & ActivityRowTronTransfer) | ({
|
|
653
|
+
kind: "referral_earning";
|
|
654
|
+
} & ActivityRowReferralEarning) | ({
|
|
655
|
+
kind: "nft_charge";
|
|
656
|
+
} & ActivityRowNftCharge);
|
|
657
|
+
type ActivityRowPayment = {
|
|
658
|
+
kind: "payment";
|
|
659
|
+
groupId: string | null;
|
|
660
|
+
id: string;
|
|
661
|
+
chain: string;
|
|
662
|
+
chainId: number;
|
|
663
|
+
occurredAt: string;
|
|
664
|
+
role: "outgoing" | "incoming";
|
|
665
|
+
payer: string;
|
|
666
|
+
beneficiary: string | null;
|
|
667
|
+
counterparty: string | null;
|
|
668
|
+
app: {
|
|
669
|
+
id: string;
|
|
670
|
+
name: string;
|
|
671
|
+
logoUrl: string | null;
|
|
672
|
+
slug: string | null;
|
|
673
|
+
bannerUrl: string | null;
|
|
674
|
+
} | null;
|
|
675
|
+
beneficiaryApp: {
|
|
676
|
+
id: string;
|
|
677
|
+
name: string;
|
|
678
|
+
logoUrl: string | null;
|
|
679
|
+
slug: string | null;
|
|
680
|
+
bannerUrl: string | null;
|
|
681
|
+
} | null;
|
|
682
|
+
amount: string;
|
|
683
|
+
token: string;
|
|
684
|
+
vault: string;
|
|
685
|
+
vaultKind: "credit" | "platform";
|
|
686
|
+
targetKind: "credit" | "pot";
|
|
687
|
+
processorAddress: string | null;
|
|
688
|
+
grossAmount: string;
|
|
689
|
+
creditedAmount: string;
|
|
690
|
+
settlement: "instant" | "locked" | null;
|
|
691
|
+
appealable: boolean;
|
|
692
|
+
disputableLegId: string | null;
|
|
693
|
+
vaultReleaseAt: string | null;
|
|
694
|
+
consolidatedAt: string | null;
|
|
695
|
+
status: "pending" | "completed" | "expired";
|
|
696
|
+
txHash: string | null;
|
|
697
|
+
blockNumber: string | null;
|
|
698
|
+
logIndex: number | null;
|
|
699
|
+
metadata?: PaymentMetadata | null;
|
|
700
|
+
usdCents: number | null;
|
|
701
|
+
};
|
|
702
|
+
type ActivityRowPaymentWithdrawal = {
|
|
703
|
+
kind: "payment_withdrawal";
|
|
704
|
+
groupId: string | null;
|
|
705
|
+
id: string;
|
|
706
|
+
chain: string;
|
|
707
|
+
occurredAt: string;
|
|
708
|
+
role: "incoming";
|
|
709
|
+
beneficiary: string;
|
|
710
|
+
counterparty: string;
|
|
711
|
+
paymentId: string | null;
|
|
712
|
+
vault: string;
|
|
713
|
+
amount: string;
|
|
714
|
+
token: string;
|
|
715
|
+
txHash: string;
|
|
716
|
+
blockNumber: string;
|
|
717
|
+
logIndex: number;
|
|
718
|
+
usdCents: number | null;
|
|
719
|
+
};
|
|
720
|
+
type ActivityRowMaturedWithdrawal = {
|
|
721
|
+
kind: "matured_withdrawal";
|
|
722
|
+
groupId: string | null;
|
|
723
|
+
id: string;
|
|
724
|
+
chain: string;
|
|
725
|
+
occurredAt: string;
|
|
726
|
+
role: "incoming";
|
|
727
|
+
beneficiary: string;
|
|
728
|
+
counterparty: string;
|
|
729
|
+
vault: string;
|
|
730
|
+
amount: string;
|
|
731
|
+
token: string;
|
|
732
|
+
txHash: string;
|
|
733
|
+
blockNumber: string;
|
|
734
|
+
logIndex: number;
|
|
735
|
+
usdCents: number | null;
|
|
736
|
+
};
|
|
737
|
+
type ActivityRowPayoutSent = {
|
|
738
|
+
kind: "payout_sent";
|
|
739
|
+
groupId: string | null;
|
|
740
|
+
id: string;
|
|
741
|
+
chain: string;
|
|
742
|
+
occurredAt: string;
|
|
743
|
+
role: "incoming";
|
|
744
|
+
recipient: string;
|
|
745
|
+
counterparty: string;
|
|
746
|
+
app: {
|
|
747
|
+
id: string;
|
|
748
|
+
name: string;
|
|
749
|
+
logoUrl: string | null;
|
|
750
|
+
slug: string | null;
|
|
751
|
+
bannerUrl: string | null;
|
|
752
|
+
} | null;
|
|
753
|
+
vault: string;
|
|
754
|
+
amount: string;
|
|
755
|
+
token: string;
|
|
756
|
+
txHash: string;
|
|
757
|
+
blockNumber: string;
|
|
758
|
+
logIndex: number;
|
|
759
|
+
metadata?: PaymentMetadata | null;
|
|
760
|
+
usdCents: number | null;
|
|
761
|
+
};
|
|
762
|
+
type ActivityRowCreditTransferred = {
|
|
763
|
+
kind: "credit_transferred";
|
|
764
|
+
groupId: string | null;
|
|
765
|
+
id: string;
|
|
766
|
+
chain: string;
|
|
767
|
+
occurredAt: string;
|
|
768
|
+
role: "incoming";
|
|
769
|
+
recipient: string;
|
|
770
|
+
counterparty: string;
|
|
771
|
+
app: {
|
|
772
|
+
id: string;
|
|
773
|
+
name: string;
|
|
774
|
+
logoUrl: string | null;
|
|
775
|
+
slug: string | null;
|
|
776
|
+
bannerUrl: string | null;
|
|
777
|
+
} | null;
|
|
778
|
+
vault: string;
|
|
779
|
+
amount: string;
|
|
780
|
+
token: string;
|
|
781
|
+
txHash: string;
|
|
782
|
+
blockNumber: string;
|
|
783
|
+
logIndex: number;
|
|
784
|
+
usdCents: number | null;
|
|
785
|
+
};
|
|
786
|
+
type ActivityRowPotLeg = {
|
|
787
|
+
kind: "pot_leg";
|
|
788
|
+
groupId: string | null;
|
|
789
|
+
id: string;
|
|
790
|
+
chain: string;
|
|
791
|
+
occurredAt: string;
|
|
792
|
+
role: "incoming";
|
|
793
|
+
beneficiary: string;
|
|
794
|
+
distributionId: string | null;
|
|
795
|
+
vault: string | null;
|
|
796
|
+
amount: string;
|
|
797
|
+
token: string;
|
|
798
|
+
settlement: "instant" | "locked";
|
|
799
|
+
releaseAt: string | null;
|
|
800
|
+
claimedAt: string | null;
|
|
801
|
+
txHash: string | null;
|
|
802
|
+
blockNumber: string | null;
|
|
803
|
+
logIndex: number | null;
|
|
804
|
+
metadata?: PaymentMetadata | null;
|
|
805
|
+
usdCents: number | null;
|
|
806
|
+
};
|
|
807
|
+
type ActivityRowPaymentAutoclaim = {
|
|
808
|
+
kind: "payment_autoclaim";
|
|
809
|
+
groupId: string | null;
|
|
810
|
+
id: string;
|
|
811
|
+
chain: string;
|
|
812
|
+
occurredAt: string;
|
|
813
|
+
role: "incoming";
|
|
814
|
+
beneficiary: string;
|
|
815
|
+
paymentId: string | null;
|
|
816
|
+
vault: string;
|
|
817
|
+
token: string;
|
|
818
|
+
autoclaimKind: "withdraw_matured" | "withdraw_escrow" | "claim_refund";
|
|
819
|
+
status: "pending" | "in_flight" | "succeeded" | "skipped" | "failed";
|
|
820
|
+
attempts: number;
|
|
821
|
+
lastError: string | null;
|
|
822
|
+
txHash: string | null;
|
|
823
|
+
settledAt: string | null;
|
|
824
|
+
};
|
|
825
|
+
type ActivityRowAppeal = {
|
|
826
|
+
kind: "appeal";
|
|
827
|
+
groupId: string | null;
|
|
828
|
+
id: string;
|
|
829
|
+
chain: string;
|
|
830
|
+
occurredAt: string;
|
|
831
|
+
role: "outgoing";
|
|
832
|
+
appellant: string;
|
|
833
|
+
counterparty: string;
|
|
834
|
+
paymentId: string | null;
|
|
835
|
+
vault: string;
|
|
836
|
+
amount: string;
|
|
837
|
+
token: string;
|
|
838
|
+
status: "pending_onchain" | "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
|
|
839
|
+
txHash: string | null;
|
|
840
|
+
blockNumber: string | null;
|
|
841
|
+
logIndex: number | null;
|
|
842
|
+
resolvedAt: string | null;
|
|
843
|
+
refundClaimedAt: string | null;
|
|
844
|
+
hasRoom: boolean;
|
|
845
|
+
resolution: {
|
|
846
|
+
resolutionId: string;
|
|
847
|
+
outcome: number;
|
|
848
|
+
deadline: number;
|
|
849
|
+
signature: string;
|
|
850
|
+
} | null;
|
|
851
|
+
usdCents: number | null;
|
|
852
|
+
};
|
|
853
|
+
type ActivityRowMoonpayBuy = {
|
|
854
|
+
kind: "moonpay_buy";
|
|
855
|
+
groupId: string | null;
|
|
856
|
+
id: string;
|
|
857
|
+
occurredAt: string;
|
|
858
|
+
role: "incoming";
|
|
859
|
+
walletAddress: string;
|
|
860
|
+
externalId: string;
|
|
861
|
+
fiatAmountCents: number;
|
|
862
|
+
fiatCurrency: string;
|
|
863
|
+
cryptoAmount: string;
|
|
864
|
+
cryptoToken: string;
|
|
865
|
+
cryptoTxHash: string | null;
|
|
866
|
+
status: "pending" | "completed" | "failed";
|
|
867
|
+
};
|
|
868
|
+
type ActivityRowMoonpaySell = {
|
|
869
|
+
kind: "moonpay_sell";
|
|
870
|
+
groupId: string | null;
|
|
871
|
+
id: string;
|
|
872
|
+
occurredAt: string;
|
|
873
|
+
role: "outgoing";
|
|
874
|
+
walletAddress: string;
|
|
875
|
+
externalId: string;
|
|
876
|
+
fiatAmountCents: number;
|
|
877
|
+
fiatCurrency: string;
|
|
878
|
+
cryptoAmount: string;
|
|
879
|
+
cryptoToken: string;
|
|
880
|
+
cryptoTxHash: string | null;
|
|
881
|
+
status: "pending" | "completed" | "failed";
|
|
882
|
+
};
|
|
883
|
+
type ActivityRowTronDeposit = {
|
|
884
|
+
kind: "tron_deposit";
|
|
885
|
+
groupId: string | null;
|
|
886
|
+
id: string;
|
|
887
|
+
occurredAt: string;
|
|
888
|
+
role: "incoming";
|
|
889
|
+
amountCents: number;
|
|
890
|
+
status: "completed" | "disputed" | "clawed_back";
|
|
891
|
+
receiptUrl: string | null;
|
|
892
|
+
paymentIntentId: string | null;
|
|
893
|
+
};
|
|
894
|
+
type ActivityRowTronPot = {
|
|
895
|
+
kind: "tron_pot";
|
|
896
|
+
groupId: string | null;
|
|
897
|
+
id: string;
|
|
898
|
+
occurredAt: string;
|
|
899
|
+
role: "incoming" | "outgoing";
|
|
900
|
+
leg: "stake" | "payout" | "dev_cut" | "purchase" | "referral";
|
|
901
|
+
amountCents: number;
|
|
902
|
+
usdCents: number;
|
|
903
|
+
status: "settled";
|
|
904
|
+
app: {
|
|
905
|
+
id: string;
|
|
906
|
+
name: string;
|
|
907
|
+
logoUrl: string | null;
|
|
908
|
+
slug: string | null;
|
|
909
|
+
bannerUrl: string | null;
|
|
910
|
+
} | null;
|
|
911
|
+
involvedUsers?: Array<ActivityTronInvolvedUser> | null;
|
|
912
|
+
metadata?: PaymentMetadata | null;
|
|
913
|
+
};
|
|
914
|
+
type ActivityTronInvolvedUser = {
|
|
915
|
+
userId: string;
|
|
916
|
+
handle: string | null;
|
|
917
|
+
displayName: string | null;
|
|
918
|
+
role: "stake" | "payout" | "dev_cut" | "purchase" | "referral";
|
|
919
|
+
amountCents: number;
|
|
920
|
+
};
|
|
921
|
+
type ActivityRowTronCashout = {
|
|
922
|
+
kind: "tron_cashout";
|
|
923
|
+
groupId: string | null;
|
|
924
|
+
id: string;
|
|
925
|
+
occurredAt: string;
|
|
926
|
+
role: "outgoing";
|
|
927
|
+
method: "stripe" | "usdc";
|
|
928
|
+
amountCents: number;
|
|
929
|
+
feeCents: number;
|
|
930
|
+
destinationAddress: string | null;
|
|
931
|
+
chain: string | null;
|
|
932
|
+
txHash: string | null;
|
|
933
|
+
status: "pending" | "approved" | "rejected" | "settled" | "failed";
|
|
934
|
+
stripeTransferId: string | null;
|
|
935
|
+
rejectionReason: string | null;
|
|
936
|
+
settledAt: string | null;
|
|
937
|
+
};
|
|
938
|
+
type ActivityRowTronTransfer = {
|
|
939
|
+
kind: "tron_transfer";
|
|
940
|
+
groupId: string | null;
|
|
941
|
+
id: string;
|
|
942
|
+
occurredAt: string;
|
|
943
|
+
role: "incoming" | "outgoing";
|
|
944
|
+
amountCents: number;
|
|
945
|
+
usdCents: number;
|
|
946
|
+
status: "settled";
|
|
947
|
+
counterpartyUserId: string | null;
|
|
948
|
+
counterpartyHandle: string | null;
|
|
949
|
+
counterpartyDisplayName: string | null;
|
|
950
|
+
note: string | null;
|
|
951
|
+
};
|
|
952
|
+
type ActivityRowReferralEarning = {
|
|
953
|
+
kind: "referral_earning";
|
|
954
|
+
groupId: string | null;
|
|
955
|
+
id: string;
|
|
956
|
+
chain: string;
|
|
957
|
+
occurredAt: string;
|
|
958
|
+
role: "incoming";
|
|
959
|
+
referralAddress: string;
|
|
960
|
+
paymentId: string | null;
|
|
961
|
+
token: string;
|
|
962
|
+
amount: string;
|
|
963
|
+
reversed: boolean;
|
|
964
|
+
txHash: string;
|
|
965
|
+
logIndex: number;
|
|
966
|
+
usdCents: number | null;
|
|
967
|
+
};
|
|
968
|
+
type ActivityRowNftCharge = {
|
|
969
|
+
kind: "nft_charge";
|
|
970
|
+
groupId: string | null;
|
|
971
|
+
id: string;
|
|
972
|
+
occurredAt: string;
|
|
973
|
+
role: "outgoing";
|
|
974
|
+
chargeKind: "registration" | "mint" | "transfer_gas";
|
|
975
|
+
amountCents: number;
|
|
976
|
+
usdCents: number;
|
|
977
|
+
status: "settled";
|
|
978
|
+
collectionAddress: string | null;
|
|
979
|
+
tokenId: string | null;
|
|
980
|
+
counterpartyUserId: string | null;
|
|
981
|
+
counterpartyHandle: string | null;
|
|
982
|
+
counterpartyDisplayName: string | null;
|
|
983
|
+
};
|
|
984
|
+
type OutstandingResponse = {
|
|
985
|
+
rows: Array<OutstandingByToken>;
|
|
986
|
+
};
|
|
987
|
+
type OutstandingByToken = {
|
|
988
|
+
chain: string;
|
|
989
|
+
token: string;
|
|
990
|
+
creditedWei: string;
|
|
991
|
+
drainedWei: string;
|
|
992
|
+
outstandingWei: string;
|
|
993
|
+
};
|
|
994
|
+
type MoonpayAvailabilityResponse = {
|
|
995
|
+
enabled: boolean;
|
|
996
|
+
direction: "buy" | "sell" | "both" | null;
|
|
997
|
+
countryCode: string | null;
|
|
998
|
+
regionSupported: boolean;
|
|
999
|
+
};
|
|
1000
|
+
type MoonpayBuyUrlResponse = {
|
|
1001
|
+
url: string;
|
|
1002
|
+
intentId: string;
|
|
1003
|
+
expiresAt: string;
|
|
1004
|
+
walletAddress: string;
|
|
1005
|
+
};
|
|
1006
|
+
type MoonpayBuyUrlRequest = {
|
|
1007
|
+
intentId: string;
|
|
1008
|
+
};
|
|
1009
|
+
type MoonpaySellUrlResponse = {
|
|
1010
|
+
url: string;
|
|
1011
|
+
transactionId: string;
|
|
1012
|
+
walletAddress: string;
|
|
1013
|
+
};
|
|
1014
|
+
type MoonpaySellUrlRequest = {
|
|
1015
|
+
usdcAmount: string;
|
|
1016
|
+
chain?: string;
|
|
1017
|
+
};
|
|
1018
|
+
type TronBalanceResponse = {
|
|
1019
|
+
enabled: boolean;
|
|
1020
|
+
balanceCents: number;
|
|
1021
|
+
frozenCents: number;
|
|
1022
|
+
currency: "tron";
|
|
1023
|
+
flagged: boolean;
|
|
1024
|
+
minDepositCents: number;
|
|
1025
|
+
maxDepositCents: number;
|
|
1026
|
+
};
|
|
1027
|
+
type TronLedgerResponse = {
|
|
1028
|
+
entries: Array<TronLedgerEntry>;
|
|
1029
|
+
nextBefore: string | null;
|
|
1030
|
+
};
|
|
1031
|
+
type TronLedgerEntry = {
|
|
1032
|
+
id: string;
|
|
1033
|
+
kind: "deposit" | "pot_stake" | "pot_payout" | "dev_earning" | "cashout_hold" | "cashout_release" | "dispute_freeze" | "dispute_unfreeze" | "hosted_billing" | "store_purchase" | "referral_earning" | "peer_transfer" | "nft_registration" | "nft_mint" | "nft_gas";
|
|
1034
|
+
amountCents: number;
|
|
1035
|
+
currency: string;
|
|
1036
|
+
createdAt: string;
|
|
1037
|
+
};
|
|
1038
|
+
type TronDepositResponse = {
|
|
1039
|
+
clientSecret: string;
|
|
1040
|
+
publishableKey: string;
|
|
1041
|
+
amountCents: number;
|
|
1042
|
+
currency: string;
|
|
1043
|
+
depositId: string;
|
|
1044
|
+
};
|
|
1045
|
+
type TronDepositRequest = {
|
|
1046
|
+
amountCents: number;
|
|
1047
|
+
};
|
|
1048
|
+
type TronTransferResponse = {
|
|
1049
|
+
status: "completed";
|
|
1050
|
+
amountCents: number;
|
|
1051
|
+
balanceCents: number;
|
|
1052
|
+
recipient: {
|
|
1053
|
+
userId: string;
|
|
1054
|
+
handle: string | null;
|
|
1055
|
+
displayName: string | null;
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
type TronTransferRequest = {
|
|
1059
|
+
recipientUserId: string;
|
|
1060
|
+
amountCents: number;
|
|
1061
|
+
note?: string;
|
|
1062
|
+
challengeId?: string;
|
|
1063
|
+
signature?: string;
|
|
1064
|
+
threadId?: string;
|
|
1065
|
+
};
|
|
1066
|
+
type TronSecuritySetting = {
|
|
1067
|
+
requireSignature: boolean;
|
|
1068
|
+
};
|
|
1069
|
+
type TronTransferChallengeResponse = ({
|
|
1070
|
+
required: false;
|
|
1071
|
+
} & TronTransferChallengeNotRequired) | ({
|
|
1072
|
+
required: true;
|
|
1073
|
+
} & TronTransferChallengeRequired);
|
|
1074
|
+
type TronTransferChallengeNotRequired = {
|
|
1075
|
+
required: false;
|
|
1076
|
+
};
|
|
1077
|
+
type TronTransferChallengeRequired = {
|
|
1078
|
+
required: true;
|
|
1079
|
+
challengeId: string;
|
|
1080
|
+
message: string;
|
|
1081
|
+
expiresAt: string;
|
|
1082
|
+
};
|
|
1083
|
+
type TronTransferChallengeRequest = {
|
|
1084
|
+
recipientUserId: string;
|
|
1085
|
+
amountCents: number;
|
|
1086
|
+
};
|
|
1087
|
+
type TronGameBalanceResponse = {
|
|
1088
|
+
balanceCents: number;
|
|
1089
|
+
rakeBps: number;
|
|
1090
|
+
};
|
|
1091
|
+
type TronChargeResponse = ({
|
|
1092
|
+
status: "completed";
|
|
1093
|
+
} & TronChargeCompleted) | ({
|
|
1094
|
+
status: "insufficient_balance";
|
|
1095
|
+
} & TronChargeInsufficient) | ({
|
|
1096
|
+
status: "redirect";
|
|
1097
|
+
} & TronChargeRedirect);
|
|
1098
|
+
type TronChargeCompleted = {
|
|
1099
|
+
status: "completed";
|
|
1100
|
+
potId: string;
|
|
1101
|
+
balanceCents: number;
|
|
1102
|
+
};
|
|
1103
|
+
type TronChargeInsufficient = {
|
|
1104
|
+
status: "insufficient_balance";
|
|
1105
|
+
potId: string;
|
|
1106
|
+
balanceCents: number;
|
|
1107
|
+
};
|
|
1108
|
+
type TronChargeRedirect = {
|
|
1109
|
+
status: "redirect";
|
|
1110
|
+
intentId: string;
|
|
1111
|
+
redirectUrl: string;
|
|
1112
|
+
amountCents: number;
|
|
1113
|
+
potId: string;
|
|
1114
|
+
};
|
|
1115
|
+
type TronChargeRequest = {
|
|
1116
|
+
potId: string;
|
|
1117
|
+
amountCents: number;
|
|
1118
|
+
returnUri: string;
|
|
1119
|
+
metadata?: PaymentMetadata;
|
|
1120
|
+
};
|
|
1121
|
+
type TronDirectChargeResponse = ({
|
|
1122
|
+
status: "completed";
|
|
1123
|
+
} & TronDirectChargeCompleted) | ({
|
|
1124
|
+
status: "insufficient_balance";
|
|
1125
|
+
} & TronDirectChargeInsufficient) | ({
|
|
1126
|
+
status: "redirect";
|
|
1127
|
+
} & TronDirectChargeRedirect);
|
|
1128
|
+
type TronDirectChargeCompleted = {
|
|
1129
|
+
status: "completed";
|
|
1130
|
+
balanceCents: number;
|
|
1131
|
+
};
|
|
1132
|
+
type TronDirectChargeInsufficient = {
|
|
1133
|
+
status: "insufficient_balance";
|
|
1134
|
+
balanceCents: number;
|
|
1135
|
+
};
|
|
1136
|
+
type TronDirectChargeRedirect = {
|
|
1137
|
+
status: "redirect";
|
|
1138
|
+
intentId: string;
|
|
1139
|
+
redirectUrl: string;
|
|
1140
|
+
amountCents: number;
|
|
1141
|
+
};
|
|
1142
|
+
type TronDirectChargeRequest = {
|
|
1143
|
+
amountCents: number;
|
|
1144
|
+
returnUri: string;
|
|
1145
|
+
metadata?: PaymentMetadata;
|
|
1146
|
+
};
|
|
1147
|
+
type TronDistributeResponse = {
|
|
1148
|
+
status: "distributed" | "replayed";
|
|
1149
|
+
potId: string;
|
|
1150
|
+
potBalanceCents: number;
|
|
1151
|
+
};
|
|
1152
|
+
type TronDistributeRequest = {
|
|
1153
|
+
potId: string;
|
|
1154
|
+
legs: Array<{
|
|
1155
|
+
recipientUserId: string;
|
|
1156
|
+
amountCents: number;
|
|
1157
|
+
}>;
|
|
1158
|
+
rakeBps?: number;
|
|
1159
|
+
devCutCents?: number;
|
|
1160
|
+
closePot?: boolean;
|
|
1161
|
+
metadata?: PaymentMetadata;
|
|
1162
|
+
};
|
|
1163
|
+
type TronConnectOnboardingResponse = {
|
|
1164
|
+
url: string;
|
|
1165
|
+
};
|
|
1166
|
+
type TronCashoutItem = {
|
|
1167
|
+
id: string;
|
|
1168
|
+
method: "stripe" | "usdc";
|
|
1169
|
+
status: "pending" | "approved" | "rejected" | "settled" | "failed";
|
|
1170
|
+
amountCents: number;
|
|
1171
|
+
feeCents: number;
|
|
1172
|
+
currency: string;
|
|
1173
|
+
destinationAddress: string | null;
|
|
1174
|
+
chain: string | null;
|
|
1175
|
+
txHash: string | null;
|
|
1176
|
+
rejectionReason: string | null;
|
|
1177
|
+
createdAt: string;
|
|
1178
|
+
settledAt: string | null;
|
|
1179
|
+
};
|
|
1180
|
+
type TronCashoutCreateRequest = {
|
|
1181
|
+
method: "stripe" | "usdc";
|
|
1182
|
+
amountCents: number;
|
|
1183
|
+
chain?: string;
|
|
1184
|
+
};
|
|
1185
|
+
type TronCashoutListResponse = {
|
|
1186
|
+
requests: Array<TronCashoutItem>;
|
|
1187
|
+
};
|
|
1188
|
+
type AdminTronCashoutListResponse = {
|
|
1189
|
+
requests: Array<AdminTronCashoutItem>;
|
|
1190
|
+
};
|
|
1191
|
+
type AdminTronCashoutItem = {
|
|
1192
|
+
id: string;
|
|
1193
|
+
method: "stripe" | "usdc";
|
|
1194
|
+
status: "pending" | "approved" | "rejected" | "settled" | "failed";
|
|
1195
|
+
amountCents: number;
|
|
1196
|
+
feeCents: number;
|
|
1197
|
+
currency: string;
|
|
1198
|
+
destinationAddress: string | null;
|
|
1199
|
+
chain: string | null;
|
|
1200
|
+
txHash: string | null;
|
|
1201
|
+
rejectionReason: string | null;
|
|
1202
|
+
createdAt: string;
|
|
1203
|
+
settledAt: string | null;
|
|
1204
|
+
userId: string;
|
|
1205
|
+
requestIdHex: string | null;
|
|
1206
|
+
usdcAmount: string | null;
|
|
1207
|
+
backendSignature: string | null;
|
|
1208
|
+
signatureDeadline: string | null;
|
|
1209
|
+
poolAddress: string | null;
|
|
1210
|
+
};
|
|
1211
|
+
type AdminTronCashoutRejectRequest = {
|
|
1212
|
+
reason: string;
|
|
1213
|
+
};
|
|
1214
|
+
type WalletListResponse = {
|
|
1215
|
+
chains: WalletChainList;
|
|
1216
|
+
wallets: Array<WalletItem>;
|
|
1217
|
+
};
|
|
1218
|
+
type WalletChainList = Array<{
|
|
1219
|
+
id: "ethereum-mainnet" | "base-mainnet" | "ethereum-sepolia";
|
|
1220
|
+
displayName: string;
|
|
1221
|
+
chainId: number;
|
|
1222
|
+
}>;
|
|
1223
|
+
type WalletItem = {
|
|
1224
|
+
address: string;
|
|
1225
|
+
label: WalletLabel;
|
|
1226
|
+
kind: "personal" | "app";
|
|
1227
|
+
app: WalletAppLink;
|
|
1228
|
+
balances: WalletBalances;
|
|
1229
|
+
delegation: WalletDelegationStatus;
|
|
1230
|
+
};
|
|
1231
|
+
type WalletLabel = string | null;
|
|
1232
|
+
type WalletAppLink = {
|
|
1233
|
+
id: string;
|
|
1234
|
+
name: string;
|
|
1235
|
+
deletedAt: string | null;
|
|
1236
|
+
} | null;
|
|
1237
|
+
type WalletBalances = {
|
|
1238
|
+
"ethereum-mainnet"?: WalletChainBalance;
|
|
1239
|
+
"base-mainnet"?: WalletChainBalance;
|
|
1240
|
+
"ethereum-sepolia"?: WalletChainBalance;
|
|
1241
|
+
};
|
|
1242
|
+
type WalletChainBalance = {
|
|
1243
|
+
native: string;
|
|
1244
|
+
usdc?: string;
|
|
1245
|
+
};
|
|
1246
|
+
type WalletDelegationStatus = {
|
|
1247
|
+
mode: WalletDelegationMode;
|
|
1248
|
+
caps: WalletDelegationCaps;
|
|
1249
|
+
policyId: string | null;
|
|
1250
|
+
};
|
|
1251
|
+
type WalletDelegationMode = "infinite" | "custom" | "scoped" | null;
|
|
1252
|
+
type WalletDelegationCaps = {
|
|
1253
|
+
native: string;
|
|
1254
|
+
usdc: string;
|
|
1255
|
+
} | null;
|
|
1256
|
+
type WalletLabelUpdateResponse = {
|
|
1257
|
+
address: string;
|
|
1258
|
+
label: WalletLabel;
|
|
1259
|
+
};
|
|
1260
|
+
type WalletLabelUpdate = {
|
|
1261
|
+
label: WalletLabel;
|
|
1262
|
+
};
|
|
1263
|
+
type CreateWalletDelegationResponse = {
|
|
1264
|
+
policyId: string | null;
|
|
1265
|
+
};
|
|
1266
|
+
type CreateWalletDelegation = {
|
|
1267
|
+
mode: "infinite";
|
|
1268
|
+
} | {
|
|
1269
|
+
mode: "custom";
|
|
1270
|
+
caps: WalletDelegationCaps;
|
|
1271
|
+
} | {
|
|
1272
|
+
mode: "scoped";
|
|
1273
|
+
};
|
|
1274
|
+
type DeleteWalletDelegationResponse = {
|
|
1275
|
+
ok: true;
|
|
1276
|
+
};
|
|
1277
|
+
type ProfileUpdate = {
|
|
1278
|
+
name?: Username;
|
|
1279
|
+
displayName?: DisplayName;
|
|
1280
|
+
bio?: string | null;
|
|
1281
|
+
websiteUrl?: WebsiteUrl;
|
|
1282
|
+
banner?: BannerVariant;
|
|
1283
|
+
presenceStatusMode?: PresenceStatusMode;
|
|
1284
|
+
environmentViewMode?: PlatformEnvironment;
|
|
1285
|
+
};
|
|
1286
|
+
type GiphySearchResponse = {
|
|
1287
|
+
results: Array<GiphySearchResult>;
|
|
1288
|
+
};
|
|
1289
|
+
type GiphySearchResult = {
|
|
1290
|
+
id: string;
|
|
1291
|
+
title: string;
|
|
1292
|
+
gifUrl: string;
|
|
1293
|
+
previewUrl: string;
|
|
1294
|
+
width: number;
|
|
1295
|
+
height: number;
|
|
1296
|
+
};
|
|
1297
|
+
type ThreadListResponse = {
|
|
1298
|
+
threads: Array<ThreadSummary>;
|
|
1299
|
+
};
|
|
1300
|
+
type ThreadSummary = ({
|
|
1301
|
+
kind: "direct";
|
|
1302
|
+
} & DirectThreadSummary) | ({
|
|
1303
|
+
kind: "group";
|
|
1304
|
+
} & GroupThreadSummary);
|
|
1305
|
+
type DirectThreadSummary = {
|
|
1306
|
+
kind: "direct";
|
|
1307
|
+
id: string;
|
|
1308
|
+
otherParticipant: ThreadParticipant;
|
|
1309
|
+
lastMessage: ThreadLastMessagePreview;
|
|
1310
|
+
unreadCount: number;
|
|
1311
|
+
pinnedAt: string | null;
|
|
1312
|
+
createdAt: string;
|
|
1313
|
+
};
|
|
1314
|
+
type ThreadParticipant = {
|
|
1315
|
+
id: string;
|
|
1316
|
+
name: string;
|
|
1317
|
+
displayName: string | null;
|
|
1318
|
+
image: string | null;
|
|
1319
|
+
};
|
|
1320
|
+
type ThreadLastMessagePreview = {
|
|
1321
|
+
id: string;
|
|
1322
|
+
senderUserId: string;
|
|
1323
|
+
body: string;
|
|
1324
|
+
envelope?: MessageEnvelope;
|
|
1325
|
+
attachment: {
|
|
1326
|
+
url: string;
|
|
1327
|
+
count: number;
|
|
1328
|
+
} | null;
|
|
1329
|
+
transaction?: MessageTransactionTronTransfer | MessageTransactionNftTransfer | null;
|
|
1330
|
+
sentAt: string;
|
|
1331
|
+
} | null;
|
|
1332
|
+
type MessageEnvelope = {
|
|
1333
|
+
v: 1;
|
|
1334
|
+
alg: "x25519-ecdh-hkdf-sha256-aes256gcm";
|
|
1335
|
+
senderPubKey: string;
|
|
1336
|
+
senderKeyId: string;
|
|
1337
|
+
recipientKeyId: string;
|
|
1338
|
+
iv: string;
|
|
1339
|
+
ct: string;
|
|
1340
|
+
} | null;
|
|
1341
|
+
type MessageTransactionTronTransfer = {
|
|
1342
|
+
kind: "tron_transfer";
|
|
1343
|
+
amountCents: number;
|
|
1344
|
+
recipientUserId: string;
|
|
1345
|
+
};
|
|
1346
|
+
type MessageTransactionNftTransfer = {
|
|
1347
|
+
kind: "nft_transfer";
|
|
1348
|
+
recipientUserId: string;
|
|
1349
|
+
collectionAddress: string;
|
|
1350
|
+
tokenId: string;
|
|
1351
|
+
amount: string;
|
|
1352
|
+
itemName: string | null;
|
|
1353
|
+
imageAssetId?: string | null;
|
|
1354
|
+
};
|
|
1355
|
+
type GroupThreadSummary = {
|
|
1356
|
+
kind: "group";
|
|
1357
|
+
id: string;
|
|
1358
|
+
title: ThreadTitle;
|
|
1359
|
+
description: ThreadDescription;
|
|
1360
|
+
logoUrl: ThreadLogoUrl;
|
|
1361
|
+
participants: Array<GroupParticipant>;
|
|
1362
|
+
myRole: ParticipantRole;
|
|
1363
|
+
lastMessage: ThreadLastMessagePreview;
|
|
1364
|
+
unreadCount: number;
|
|
1365
|
+
pinnedAt: string | null;
|
|
1366
|
+
createdAt: string;
|
|
1367
|
+
};
|
|
1368
|
+
type ThreadTitle = string;
|
|
1369
|
+
type ThreadDescription = string | null;
|
|
1370
|
+
type ThreadLogoUrl = string | null;
|
|
1371
|
+
type GroupParticipant = {
|
|
1372
|
+
id: string;
|
|
1373
|
+
name: string;
|
|
1374
|
+
displayName: string | null;
|
|
1375
|
+
image: string | null;
|
|
1376
|
+
role: ParticipantRole;
|
|
1377
|
+
};
|
|
1378
|
+
type ParticipantRole = "admin" | "member";
|
|
1379
|
+
type CreateDirectThreadBody = {
|
|
1380
|
+
kind?: "direct";
|
|
1381
|
+
recipientUserId: string;
|
|
1382
|
+
};
|
|
1383
|
+
type MessagingOkResponse = {
|
|
1384
|
+
ok: true;
|
|
1385
|
+
};
|
|
1386
|
+
type GroupThreadMutationResponse = {
|
|
1387
|
+
thread: GroupThreadSummary;
|
|
1388
|
+
};
|
|
1389
|
+
type UpdateThreadSettingsBody = {
|
|
1390
|
+
title?: ThreadTitle;
|
|
1391
|
+
description?: ThreadDescription;
|
|
1392
|
+
};
|
|
1393
|
+
type MessagesPageResponse = {
|
|
1394
|
+
messages: Array<MessageItem>;
|
|
1395
|
+
nextBefore: string | null;
|
|
1396
|
+
};
|
|
1397
|
+
type MessageItem = {
|
|
1398
|
+
id: string;
|
|
1399
|
+
threadId: string;
|
|
1400
|
+
senderUserId: string;
|
|
1401
|
+
transaction?: MessageTransactionTronTransfer | MessageTransactionNftTransfer | null;
|
|
1402
|
+
body: string;
|
|
1403
|
+
envelope?: MessageEnvelope;
|
|
1404
|
+
sentAt: string;
|
|
1405
|
+
editedAt: string | null;
|
|
1406
|
+
deletedAt: string | null;
|
|
1407
|
+
replyTo: MessageReplyPreview;
|
|
1408
|
+
reactions: Array<ReactionAggregate>;
|
|
1409
|
+
attachments: Array<MessageAttachment>;
|
|
1410
|
+
linkPreviews: Array<MessageLinkPreview>;
|
|
1411
|
+
};
|
|
1412
|
+
type MessageReplyPreview = {
|
|
1413
|
+
id: string;
|
|
1414
|
+
senderUserId: string;
|
|
1415
|
+
body: string | null;
|
|
1416
|
+
envelope?: MessageEnvelope;
|
|
1417
|
+
} | null;
|
|
1418
|
+
type ReactionAggregate = {
|
|
1419
|
+
emoji: ReactionEmoji;
|
|
1420
|
+
count: number;
|
|
1421
|
+
userIds: Array<string>;
|
|
1422
|
+
};
|
|
1423
|
+
type ReactionEmoji = "👍" | "👎" | "❤️" | "😂" | "😮" | "😢" | "🔥" | "🎉" | "🙏" | "👀" | "✅" | "🎮";
|
|
1424
|
+
type MessageAttachment = {
|
|
1425
|
+
id: string;
|
|
1426
|
+
kind: MessageAttachmentKind;
|
|
1427
|
+
url: string;
|
|
1428
|
+
contentType: string;
|
|
1429
|
+
fileName: string;
|
|
1430
|
+
byteSize: number;
|
|
1431
|
+
width: number | null;
|
|
1432
|
+
height: number | null;
|
|
1433
|
+
};
|
|
1434
|
+
type MessageAttachmentKind = "image";
|
|
1435
|
+
type MessageLinkPreview = {
|
|
1436
|
+
url: string;
|
|
1437
|
+
title: string | null;
|
|
1438
|
+
description: string | null;
|
|
1439
|
+
imageUrl: string | null;
|
|
1440
|
+
siteName: string | null;
|
|
1441
|
+
};
|
|
1442
|
+
type SendMessageBody = {
|
|
1443
|
+
body?: SendMessageText;
|
|
1444
|
+
envelope?: MessageEnvelope;
|
|
1445
|
+
replyToMessageId?: string;
|
|
1446
|
+
attachmentIds?: Array<string>;
|
|
1447
|
+
};
|
|
1448
|
+
type SendMessageText = string;
|
|
1449
|
+
type EditMessageBody = {
|
|
1450
|
+
body?: MessageBody;
|
|
1451
|
+
envelope?: MessageEnvelope;
|
|
1452
|
+
};
|
|
1453
|
+
type MessageBody = string;
|
|
1454
|
+
type ReactionMutationResponse = {
|
|
1455
|
+
aggregate: ReactionAggregate | null;
|
|
1456
|
+
};
|
|
1457
|
+
type UploadAttachmentResponse = {
|
|
1458
|
+
attachment: MessageAttachment;
|
|
1459
|
+
};
|
|
1460
|
+
type InviteParticipantsBody = {
|
|
1461
|
+
userIds: Array<string>;
|
|
1462
|
+
};
|
|
1463
|
+
type PinThreadResponse = {
|
|
1464
|
+
pinnedAt: string;
|
|
1465
|
+
};
|
|
1466
|
+
type DmKeyResponse = {
|
|
1467
|
+
key: DmPublicKeyEntry;
|
|
1468
|
+
};
|
|
1469
|
+
type DmPublicKeyEntry = {
|
|
1470
|
+
userId: string;
|
|
1471
|
+
keyId: string;
|
|
1472
|
+
publicKey: string;
|
|
1473
|
+
algorithm: DmKeyAlgorithm;
|
|
1474
|
+
};
|
|
1475
|
+
type DmKeyAlgorithm = "x25519";
|
|
1476
|
+
type PublishDmKeyBody = {
|
|
1477
|
+
publicKey: string;
|
|
1478
|
+
keyId: string;
|
|
1479
|
+
algorithm: DmKeyAlgorithm;
|
|
1480
|
+
};
|
|
1481
|
+
type BatchThreadDmKeysResponse = {
|
|
1482
|
+
keys: Array<ThreadDmKeyEntry>;
|
|
1483
|
+
};
|
|
1484
|
+
type ThreadDmKeyEntry = {
|
|
1485
|
+
threadId: string;
|
|
1486
|
+
key: DmPublicKeyEntry | null;
|
|
1487
|
+
};
|
|
1488
|
+
type DmKeyBackupStatusResponse = {
|
|
1489
|
+
exists: boolean;
|
|
1490
|
+
attemptsRemaining: number;
|
|
1491
|
+
kdfSalt: string | null;
|
|
1492
|
+
kdfIterations: number | null;
|
|
1493
|
+
};
|
|
1494
|
+
type DmKeyBackupOkResponse = {
|
|
1495
|
+
ok: true;
|
|
1496
|
+
};
|
|
1497
|
+
type DmKeyBackupSetupBody = {
|
|
1498
|
+
scalar: string;
|
|
1499
|
+
secret: string;
|
|
1500
|
+
pinKey: string;
|
|
1501
|
+
kdfSalt: string;
|
|
1502
|
+
kdfIterations: number;
|
|
1503
|
+
};
|
|
1504
|
+
type DmKeyBackupUnlockResponse = {
|
|
1505
|
+
result: "ok";
|
|
1506
|
+
scalar: string;
|
|
1507
|
+
} | {
|
|
1508
|
+
result: "wrong-pin";
|
|
1509
|
+
attemptsRemaining: number;
|
|
1510
|
+
};
|
|
1511
|
+
type DmKeyBackupUnlockBody = {
|
|
1512
|
+
pinKey: string;
|
|
1513
|
+
};
|
|
1514
|
+
type UpdateParticipantRoleBody = {
|
|
1515
|
+
role: ParticipantRole;
|
|
1516
|
+
};
|
|
1517
|
+
type ReferralOverview = {
|
|
1518
|
+
code: string | null;
|
|
1519
|
+
xLinked: boolean;
|
|
1520
|
+
referrer: ReferralReferrer;
|
|
1521
|
+
refereeCount: number;
|
|
1522
|
+
lifetimeEarnings: Array<ReferralEarningTotal>;
|
|
1523
|
+
lifetimeUsdCents: number | null;
|
|
1524
|
+
last30dEarnings: Array<ReferralEarningTotal>;
|
|
1525
|
+
last30dUsdCents: number | null;
|
|
1526
|
+
};
|
|
1527
|
+
type ReferralReferrer = {
|
|
1528
|
+
name: string | null;
|
|
1529
|
+
handle: string | null;
|
|
1530
|
+
} | null;
|
|
1531
|
+
type ReferralEarningTotal = {
|
|
1532
|
+
chain: string;
|
|
1533
|
+
token: string;
|
|
1534
|
+
amount: string;
|
|
1535
|
+
usdCents: number | null;
|
|
1536
|
+
};
|
|
1537
|
+
type ReferralCodeResponse = {
|
|
1538
|
+
code: string;
|
|
1539
|
+
generatedAt: string;
|
|
1540
|
+
};
|
|
1541
|
+
type ReferralPreviewResponse = {
|
|
1542
|
+
status: "eligible" | "already-referred" | "self-referral" | "unknown-code" | "revoked-code" | "window-expired";
|
|
1543
|
+
referrer: ReferralReferrer;
|
|
1544
|
+
};
|
|
1545
|
+
type ReferralBindResponse = {
|
|
1546
|
+
status: "bound" | "already-referred" | "self-referral" | "unknown-code" | "revoked-code" | "window-expired";
|
|
1547
|
+
referrer: ReferralReferrer;
|
|
1548
|
+
};
|
|
1549
|
+
type ReferralBindRequest = {
|
|
1550
|
+
code: string;
|
|
1551
|
+
source?: "signup-url" | "manual-claim" | "cookie-restore";
|
|
1552
|
+
};
|
|
1553
|
+
type PlaySessionAppId = string;
|
|
1554
|
+
type WebPresenceHeartbeatAck = {
|
|
1555
|
+
ok: true;
|
|
1556
|
+
ttlSeconds: number;
|
|
1557
|
+
};
|
|
1558
|
+
type PlaytimeOverview = {
|
|
1559
|
+
apps: Array<PlaytimeAppEntry>;
|
|
1560
|
+
totalSessionCount: number;
|
|
1561
|
+
totalDurationSeconds: number;
|
|
1562
|
+
};
|
|
1563
|
+
type PlaytimeAppEntry = {
|
|
1564
|
+
appId: PlaySessionAppId;
|
|
1565
|
+
name: string;
|
|
1566
|
+
logoUrl: string | null;
|
|
1567
|
+
sessionCount: number;
|
|
1568
|
+
totalDurationSeconds: number;
|
|
1569
|
+
};
|
|
1570
|
+
type PlaytimeTimeseries = {
|
|
1571
|
+
from: string;
|
|
1572
|
+
to: string;
|
|
1573
|
+
buckets: Array<PlaytimeTimeseriesBucket>;
|
|
1574
|
+
};
|
|
1575
|
+
type PlaytimeTimeseriesBucket = {
|
|
1576
|
+
date: string;
|
|
1577
|
+
appId: PlaySessionAppId;
|
|
1578
|
+
sessionCount: number;
|
|
1579
|
+
totalDurationSeconds: number;
|
|
1580
|
+
};
|
|
1581
|
+
type InventoryListResponse = {
|
|
1582
|
+
items: Array<InventoryHolding>;
|
|
1583
|
+
};
|
|
1584
|
+
type InventoryHolding = {
|
|
1585
|
+
collectionId: string;
|
|
1586
|
+
collectionAddress: string;
|
|
1587
|
+
chain: string;
|
|
1588
|
+
kind: "erc721" | "erc1155";
|
|
1589
|
+
tokenId: string;
|
|
1590
|
+
amount: string;
|
|
1591
|
+
name: string | null;
|
|
1592
|
+
description: string | null;
|
|
1593
|
+
imageAssetId: string | null;
|
|
1594
|
+
bannerAssetId: string | null;
|
|
1595
|
+
devMetadata: {
|
|
1596
|
+
[key: string]: unknown;
|
|
1597
|
+
};
|
|
1598
|
+
appId: string | null;
|
|
1599
|
+
appName: string | null;
|
|
1600
|
+
appLogoUrl: string | null;
|
|
1601
|
+
};
|
|
1602
|
+
type InventoryPendingPermitListResponse = {
|
|
1603
|
+
permits: Array<InventoryPendingPermit>;
|
|
1604
|
+
};
|
|
1605
|
+
type InventoryPendingPermit = {
|
|
1606
|
+
id: string;
|
|
1607
|
+
appId: string;
|
|
1608
|
+
itemId: string;
|
|
1609
|
+
amount: string;
|
|
1610
|
+
priceCents: number | null;
|
|
1611
|
+
gasSponsored: boolean;
|
|
1612
|
+
environment: "development" | "production";
|
|
1613
|
+
createdAt: string;
|
|
1614
|
+
tokenId: string;
|
|
1615
|
+
name: string | null;
|
|
1616
|
+
description: string | null;
|
|
1617
|
+
imageAssetId: string | null;
|
|
1618
|
+
chain: string;
|
|
1619
|
+
collectionAddress: string;
|
|
1620
|
+
kind: "erc721" | "erc1155";
|
|
1621
|
+
};
|
|
1622
|
+
type InventoryPermitRedeemResult = {
|
|
1623
|
+
mint: MintRequestResult;
|
|
1624
|
+
charge: {
|
|
1625
|
+
currency: "tron";
|
|
1626
|
+
gasCents: number;
|
|
1627
|
+
priceCents: number;
|
|
1628
|
+
totalCents: number;
|
|
1629
|
+
gasPaidBy: "user" | "developer";
|
|
1630
|
+
};
|
|
1631
|
+
};
|
|
1632
|
+
type MintRequestResult = {
|
|
1633
|
+
mintRequestId: string;
|
|
1634
|
+
txHash: string;
|
|
1635
|
+
status: "submitted" | "completed";
|
|
1636
|
+
mintedTokenId: string | null;
|
|
1637
|
+
};
|
|
1638
|
+
type MintRequestInput = {
|
|
1639
|
+
collectionAddress: string;
|
|
1640
|
+
chain: string;
|
|
1641
|
+
toWallet?: string;
|
|
1642
|
+
toUserId?: string;
|
|
1643
|
+
tokenId?: string;
|
|
1644
|
+
amount?: string;
|
|
1645
|
+
};
|
|
1646
|
+
type InventoryCollectionListResponse = {
|
|
1647
|
+
collections: Array<InventoryCollectionSummary>;
|
|
1648
|
+
};
|
|
1649
|
+
type InventoryCollectionSummary = {
|
|
1650
|
+
id: string;
|
|
1651
|
+
chain: string;
|
|
1652
|
+
collectionAddress: string;
|
|
1653
|
+
kind: "erc721" | "erc1155";
|
|
1654
|
+
name: string | null;
|
|
1655
|
+
environment: "development" | "production";
|
|
1656
|
+
};
|
|
1657
|
+
type InventoryRegistrationQuote = {
|
|
1658
|
+
itemCount: number;
|
|
1659
|
+
baselineUsdCents: number;
|
|
1660
|
+
gasUsdCents: number;
|
|
1661
|
+
tron: {
|
|
1662
|
+
baselineCents: number;
|
|
1663
|
+
gasCents: number;
|
|
1664
|
+
totalCents: number;
|
|
1665
|
+
};
|
|
1666
|
+
eth: {
|
|
1667
|
+
baselineWei: string;
|
|
1668
|
+
gasWei: string;
|
|
1669
|
+
totalWei: string;
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
type InventoryItemRegistrationInput = {
|
|
1673
|
+
collectionAddress: string;
|
|
1674
|
+
chain: string;
|
|
1675
|
+
items: Array<InventoryItemRegistrationSpec>;
|
|
1676
|
+
};
|
|
1677
|
+
type InventoryItemRegistrationSpec = {
|
|
1678
|
+
name?: string | null;
|
|
1679
|
+
description?: string | null;
|
|
1680
|
+
devMetadata?: {
|
|
1681
|
+
[key: string]: unknown;
|
|
1682
|
+
};
|
|
1683
|
+
supplyType?: InventorySupplyType;
|
|
1684
|
+
maxSupply?: string | null;
|
|
1685
|
+
active?: boolean;
|
|
1686
|
+
};
|
|
1687
|
+
type InventorySupplyType = "capped" | "flexible" | "unlimited";
|
|
1688
|
+
type InventoryItemRegistrationResult = {
|
|
1689
|
+
items: Array<InventoryItemRecord>;
|
|
1690
|
+
charge: {
|
|
1691
|
+
currency: "tron";
|
|
1692
|
+
amountCents: number;
|
|
1693
|
+
baselineCents: number;
|
|
1694
|
+
gasCents: number;
|
|
1695
|
+
addItemTxHash: string;
|
|
1696
|
+
};
|
|
1697
|
+
};
|
|
1698
|
+
type InventoryItemRecord = {
|
|
1699
|
+
id: string;
|
|
1700
|
+
collectionId: string;
|
|
1701
|
+
collectionAddress: string;
|
|
1702
|
+
chain: string;
|
|
1703
|
+
kind: "erc721" | "erc1155";
|
|
1704
|
+
tokenId: string;
|
|
1705
|
+
name: string | null;
|
|
1706
|
+
description: string | null;
|
|
1707
|
+
imageAssetId: string | null;
|
|
1708
|
+
bannerAssetId: string | null;
|
|
1709
|
+
devMetadata: {
|
|
1710
|
+
[key: string]: unknown;
|
|
1711
|
+
};
|
|
1712
|
+
supplyType: InventorySupplyType | null;
|
|
1713
|
+
maxSupply: string | null;
|
|
1714
|
+
active: boolean;
|
|
1715
|
+
};
|
|
1716
|
+
type InventoryItemListResponse = {
|
|
1717
|
+
items: Array<InventoryItemRecord>;
|
|
1718
|
+
};
|
|
1719
|
+
type InventoryMintPermitRecord = {
|
|
1720
|
+
id: string;
|
|
1721
|
+
appId: string;
|
|
1722
|
+
itemId: string;
|
|
1723
|
+
userId: string;
|
|
1724
|
+
amount: string;
|
|
1725
|
+
priceCents: number | null;
|
|
1726
|
+
gasSponsored: boolean;
|
|
1727
|
+
status: "pending" | "redeemed" | "revoked";
|
|
1728
|
+
createdAt: string;
|
|
1729
|
+
};
|
|
1730
|
+
type InventoryMintPermitCreateInput = {
|
|
1731
|
+
toUserId: string;
|
|
1732
|
+
amount?: string;
|
|
1733
|
+
priceCents?: number | null;
|
|
1734
|
+
gasSponsored?: boolean;
|
|
1735
|
+
};
|
|
1736
|
+
type InventoryItemHoldersResponse = {
|
|
1737
|
+
stats: InventoryItemStats;
|
|
1738
|
+
holders: Array<InventoryItemHolder>;
|
|
1739
|
+
};
|
|
1740
|
+
type InventoryItemStats = {
|
|
1741
|
+
holderCount: number;
|
|
1742
|
+
walletCount: number;
|
|
1743
|
+
totalHeld: string;
|
|
1744
|
+
};
|
|
1745
|
+
type InventoryItemHolder = {
|
|
1746
|
+
walletAddress: string;
|
|
1747
|
+
userId: string | null;
|
|
1748
|
+
amount: string;
|
|
1749
|
+
};
|
|
1750
|
+
type InventoryVaultPermitRecord = {
|
|
1751
|
+
id: string;
|
|
1752
|
+
appId: string;
|
|
1753
|
+
itemId: string;
|
|
1754
|
+
userId: string;
|
|
1755
|
+
direction: "vault_in" | "withdraw";
|
|
1756
|
+
lockKind: "vault" | "burn" | null;
|
|
1757
|
+
amount: string;
|
|
1758
|
+
gasSponsored: boolean;
|
|
1759
|
+
status: "pending" | "redeemed" | "revoked";
|
|
1760
|
+
custodyId: string | null;
|
|
1761
|
+
createdAt: string;
|
|
1762
|
+
};
|
|
1763
|
+
type InventoryVaultPermitCreateInput = {
|
|
1764
|
+
toUserId: string;
|
|
1765
|
+
lockKind: "vault" | "burn";
|
|
1766
|
+
amount?: string;
|
|
1767
|
+
gasSponsored?: boolean;
|
|
1768
|
+
};
|
|
1769
|
+
type InventoryWithdrawPermitCreateInput = {
|
|
1770
|
+
custodyId: string;
|
|
1771
|
+
};
|
|
1772
|
+
type InventoryPendingVaultPermitListResponse = {
|
|
1773
|
+
permits: Array<InventoryPendingVaultPermit>;
|
|
1774
|
+
};
|
|
1775
|
+
type InventoryPendingVaultPermit = {
|
|
1776
|
+
id: string;
|
|
1777
|
+
appId: string;
|
|
1778
|
+
itemId: string;
|
|
1779
|
+
direction: "vault_in" | "withdraw";
|
|
1780
|
+
lockKind: "vault" | "burn" | null;
|
|
1781
|
+
amount: string;
|
|
1782
|
+
gasSponsored: boolean;
|
|
1783
|
+
environment: "development" | "production";
|
|
1784
|
+
custodyId: string | null;
|
|
1785
|
+
createdAt: string;
|
|
1786
|
+
tokenId: string;
|
|
1787
|
+
name: string | null;
|
|
1788
|
+
description: string | null;
|
|
1789
|
+
imageAssetId: string | null;
|
|
1790
|
+
chain: string;
|
|
1791
|
+
collectionAddress: string;
|
|
1792
|
+
kind: "erc721" | "erc1155";
|
|
1793
|
+
};
|
|
1794
|
+
type InventorySignedVaultPermit = {
|
|
1795
|
+
permitId: string;
|
|
1796
|
+
direction: "vault_in" | "withdraw";
|
|
1797
|
+
vault: string;
|
|
1798
|
+
collection: string;
|
|
1799
|
+
user: string;
|
|
1800
|
+
tokenId: string;
|
|
1801
|
+
amount: string;
|
|
1802
|
+
lockKind: "vault" | "burn" | null;
|
|
1803
|
+
destination: string | null;
|
|
1804
|
+
deadline: number;
|
|
1805
|
+
signature: string;
|
|
1806
|
+
};
|
|
1807
|
+
type InventoryRelayedVaultQuoteResponse = {
|
|
1808
|
+
direction: "vault_in" | "withdraw";
|
|
1809
|
+
collection: string;
|
|
1810
|
+
vault: string;
|
|
1811
|
+
chainId: number;
|
|
1812
|
+
user: string;
|
|
1813
|
+
tokenId: string;
|
|
1814
|
+
amount: string;
|
|
1815
|
+
nonce: string | null;
|
|
1816
|
+
deadline: number;
|
|
1817
|
+
feeCents: number;
|
|
1818
|
+
gasWei: string;
|
|
1819
|
+
gasPaidBy: "developer" | "user";
|
|
1820
|
+
requiresUserSignature: boolean;
|
|
1821
|
+
};
|
|
1822
|
+
type InventoryRelayedVaultSubmitResponse = {
|
|
1823
|
+
ok: boolean;
|
|
1824
|
+
txHash: string;
|
|
1825
|
+
chargedCents: number;
|
|
1826
|
+
gasPaidBy: "developer" | "user";
|
|
1827
|
+
};
|
|
1828
|
+
type InventoryRelayedVaultSubmitRequest = {
|
|
1829
|
+
userSignature?: string;
|
|
1830
|
+
deadline?: number;
|
|
1831
|
+
};
|
|
1832
|
+
type InventoryNftTransferQuoteResponse = {
|
|
1833
|
+
collection: string;
|
|
1834
|
+
chainId: number;
|
|
1835
|
+
from: string;
|
|
1836
|
+
to: string;
|
|
1837
|
+
tokenId: string;
|
|
1838
|
+
amount: string;
|
|
1839
|
+
nonce: string;
|
|
1840
|
+
deadline: number;
|
|
1841
|
+
feeCents: number;
|
|
1842
|
+
gasWei: string;
|
|
1843
|
+
selfPayAvailable: boolean;
|
|
1844
|
+
};
|
|
1845
|
+
type InventoryNftTransferQuoteRequest = {
|
|
1846
|
+
toUserId: string;
|
|
1847
|
+
collection: string;
|
|
1848
|
+
tokenId: string;
|
|
1849
|
+
amount?: string;
|
|
1850
|
+
};
|
|
1851
|
+
type InventoryNftTransferResponse = {
|
|
1852
|
+
ok: boolean;
|
|
1853
|
+
txHash: string;
|
|
1854
|
+
chargedCents: number;
|
|
1855
|
+
};
|
|
1856
|
+
type InventoryNftTransferRequest = {
|
|
1857
|
+
toUserId: string;
|
|
1858
|
+
collection: string;
|
|
1859
|
+
tokenId: string;
|
|
1860
|
+
amount?: string;
|
|
1861
|
+
deadline: number;
|
|
1862
|
+
userSignature: string;
|
|
1863
|
+
threadId?: string;
|
|
1864
|
+
};
|
|
1865
|
+
type InventoryVaultCustodyListResponse = {
|
|
1866
|
+
custody: Array<InventoryVaultCustody>;
|
|
1867
|
+
};
|
|
1868
|
+
type InventoryVaultCustody = {
|
|
1869
|
+
id: string;
|
|
1870
|
+
collectionId: string;
|
|
1871
|
+
collectionAddress: string;
|
|
1872
|
+
chain: string;
|
|
1873
|
+
kind: "erc721" | "erc1155";
|
|
1874
|
+
tokenId: string;
|
|
1875
|
+
amount: string;
|
|
1876
|
+
lockKind: "vault" | "burn";
|
|
1877
|
+
vaultAddress: string;
|
|
1878
|
+
createdAt: string;
|
|
1879
|
+
name: string | null;
|
|
1880
|
+
description: string | null;
|
|
1881
|
+
imageAssetId: string | null;
|
|
1882
|
+
};
|
|
1883
|
+
type InventoryVaultForceWithdrawResponse = {
|
|
1884
|
+
ok: boolean;
|
|
1885
|
+
txHash: string;
|
|
1886
|
+
};
|
|
1887
|
+
type NotificationListResponse = {
|
|
1888
|
+
notifications: Array<NotificationItem>;
|
|
1889
|
+
unreadCount: number;
|
|
1890
|
+
};
|
|
1891
|
+
type NotificationItem = {
|
|
1892
|
+
id: string;
|
|
1893
|
+
kind: "friend_request";
|
|
1894
|
+
payload: FriendRequestNotificationPayload;
|
|
1895
|
+
read: boolean;
|
|
1896
|
+
createdAt: string;
|
|
1897
|
+
} | {
|
|
1898
|
+
id: string;
|
|
1899
|
+
kind: "friend_accepted";
|
|
1900
|
+
payload: FriendAcceptedNotificationPayload;
|
|
1901
|
+
read: boolean;
|
|
1902
|
+
createdAt: string;
|
|
1903
|
+
} | {
|
|
1904
|
+
id: string;
|
|
1905
|
+
kind: "app_page_approved";
|
|
1906
|
+
payload: AppPageApprovedNotificationPayload;
|
|
1907
|
+
read: boolean;
|
|
1908
|
+
createdAt: string;
|
|
1909
|
+
} | {
|
|
1910
|
+
id: string;
|
|
1911
|
+
kind: "app_page_rejected";
|
|
1912
|
+
payload: AppPageRejectedNotificationPayload;
|
|
1913
|
+
read: boolean;
|
|
1914
|
+
createdAt: string;
|
|
1915
|
+
} | {
|
|
1916
|
+
id: string;
|
|
1917
|
+
kind: "app_participant_invite";
|
|
1918
|
+
payload: AppParticipantInviteNotificationPayload;
|
|
1919
|
+
read: boolean;
|
|
1920
|
+
createdAt: string;
|
|
1921
|
+
} | {
|
|
1922
|
+
id: string;
|
|
1923
|
+
kind: "app_participant_accepted";
|
|
1924
|
+
payload: AppParticipantAcceptedNotificationPayload;
|
|
1925
|
+
read: boolean;
|
|
1926
|
+
createdAt: string;
|
|
1927
|
+
};
|
|
1928
|
+
type FriendRequestNotificationPayload = {
|
|
1929
|
+
requesterId: string;
|
|
1930
|
+
requesterName: string;
|
|
1931
|
+
requesterDisplayName: string | null;
|
|
1932
|
+
requesterImage: string | null;
|
|
1933
|
+
friendshipId: string;
|
|
1934
|
+
};
|
|
1935
|
+
type FriendAcceptedNotificationPayload = {
|
|
1936
|
+
accepterId: string;
|
|
1937
|
+
accepterName: string;
|
|
1938
|
+
accepterDisplayName: string | null;
|
|
1939
|
+
accepterImage: string | null;
|
|
1940
|
+
friendshipId: string;
|
|
1941
|
+
};
|
|
1942
|
+
type AppPageApprovedNotificationPayload = {
|
|
1943
|
+
appId: string;
|
|
1944
|
+
appName: string;
|
|
1945
|
+
scope: "publish" | "changes";
|
|
1946
|
+
};
|
|
1947
|
+
type AppPageRejectedNotificationPayload = {
|
|
1948
|
+
appId: string;
|
|
1949
|
+
appName: string;
|
|
1950
|
+
scope: "publish" | "changes";
|
|
1951
|
+
notes: string;
|
|
1952
|
+
};
|
|
1953
|
+
type AppParticipantInviteNotificationPayload = {
|
|
1954
|
+
appId: string;
|
|
1955
|
+
appName: string;
|
|
1956
|
+
appLogoUrl: string | null;
|
|
1957
|
+
inviterId: string;
|
|
1958
|
+
inviterName: string;
|
|
1959
|
+
inviterDisplayName: string | null;
|
|
1960
|
+
};
|
|
1961
|
+
type AppParticipantAcceptedNotificationPayload = {
|
|
1962
|
+
appId: string;
|
|
1963
|
+
appName: string;
|
|
1964
|
+
accepterId: string;
|
|
1965
|
+
accepterName: string;
|
|
1966
|
+
accepterDisplayName: string | null;
|
|
1967
|
+
accepterImage: string | null;
|
|
1968
|
+
};
|
|
1969
|
+
type NotificationUpdate = {
|
|
1970
|
+
read: boolean;
|
|
1971
|
+
};
|
|
1972
|
+
type FriendListResponse = {
|
|
1973
|
+
friends: Array<FriendListItem>;
|
|
1974
|
+
};
|
|
1975
|
+
type FriendListItem = {
|
|
1976
|
+
user: ThreadParticipant;
|
|
1977
|
+
friendshipId: string;
|
|
1978
|
+
acceptedAt: string;
|
|
1979
|
+
onlineStatus: OnlineStatus;
|
|
1980
|
+
};
|
|
1981
|
+
type OnlineStatus = "online" | "offline";
|
|
1982
|
+
type AppFriendListResponse = {
|
|
1983
|
+
friends: Array<ThreadParticipant>;
|
|
1984
|
+
};
|
|
1985
|
+
type FriendRequestDecision = {
|
|
1986
|
+
decision: "accept" | "reject";
|
|
1987
|
+
};
|
|
1988
|
+
type SocialListResponse = {
|
|
1989
|
+
accounts: Array<SocialAccount>;
|
|
1990
|
+
};
|
|
1991
|
+
type SocialAccount = {
|
|
1992
|
+
provider: "twitter" | "discord" | "github";
|
|
1993
|
+
subject: string;
|
|
1994
|
+
username: string | null;
|
|
1995
|
+
name: string | null;
|
|
1996
|
+
profilePictureUrl: string | null;
|
|
1997
|
+
verifiedAt: string | null;
|
|
1998
|
+
};
|
|
1999
|
+
type PublicProfile = {
|
|
2000
|
+
id: string;
|
|
2001
|
+
name: string;
|
|
2002
|
+
displayName: string | null;
|
|
2003
|
+
bio: string | null;
|
|
2004
|
+
websiteUrl: string | null;
|
|
2005
|
+
image: string | null;
|
|
2006
|
+
banner: BannerVariant;
|
|
2007
|
+
createdAt: string;
|
|
2008
|
+
socials: Array<SocialAccount>;
|
|
2009
|
+
developer: PublicProfileDeveloper;
|
|
2010
|
+
counts: ProfileCounts;
|
|
2011
|
+
stats: ProfileStats;
|
|
2012
|
+
topGames: Array<ProfileTopGame>;
|
|
2013
|
+
recentReviews: Array<ProfileRecentReview>;
|
|
2014
|
+
relationship: Relationship;
|
|
2015
|
+
};
|
|
2016
|
+
type PublicProfileDeveloper = {
|
|
2017
|
+
profile: DeveloperProfile;
|
|
2018
|
+
apps: Array<PublicDeveloperApp>;
|
|
2019
|
+
} | null;
|
|
2020
|
+
type DeveloperProfile = {
|
|
2021
|
+
studioName: string | null;
|
|
2022
|
+
studioUrl: string | null;
|
|
2023
|
+
studioXHandle: XHandle;
|
|
2024
|
+
githubUrl: GitHubUrl;
|
|
2025
|
+
logoUrl: string | null;
|
|
2026
|
+
};
|
|
2027
|
+
type XHandle = string | null;
|
|
2028
|
+
type GitHubUrl = string | null;
|
|
2029
|
+
type PublicDeveloperApp = {
|
|
2030
|
+
id: string;
|
|
2031
|
+
name: string;
|
|
2032
|
+
logoUrl: string | null;
|
|
2033
|
+
environment: "development" | "production";
|
|
2034
|
+
};
|
|
2035
|
+
type ProfileCounts = {
|
|
2036
|
+
followers: number;
|
|
2037
|
+
following: number;
|
|
2038
|
+
};
|
|
2039
|
+
type ProfileStats = {
|
|
2040
|
+
gamesPlayed: number;
|
|
2041
|
+
totalPlaytimeSeconds: number;
|
|
2042
|
+
reviewsLeft: number;
|
|
2043
|
+
rewardsWon: number;
|
|
2044
|
+
rewardsValueUsdCents: number;
|
|
2045
|
+
};
|
|
2046
|
+
type ProfileTopGame = {
|
|
2047
|
+
appId: string;
|
|
2048
|
+
name: string;
|
|
2049
|
+
logoUrl: string | null;
|
|
2050
|
+
sessionCount: number;
|
|
2051
|
+
totalPlaytimeSeconds: number;
|
|
2052
|
+
};
|
|
2053
|
+
type ProfileRecentReview = {
|
|
2054
|
+
appId: string;
|
|
2055
|
+
appName: string;
|
|
2056
|
+
appLogoUrl: string | null;
|
|
2057
|
+
recommended: boolean;
|
|
2058
|
+
body: string;
|
|
2059
|
+
createdAt: string;
|
|
2060
|
+
};
|
|
2061
|
+
type Relationship = {
|
|
2062
|
+
isFollowing: boolean;
|
|
2063
|
+
isFollowedBy: boolean;
|
|
2064
|
+
friendship: "none" | "pending_out" | "pending_in" | "accepted";
|
|
2065
|
+
friendshipId: string | null;
|
|
2066
|
+
} | null;
|
|
2067
|
+
type UserSearchResponse = {
|
|
2068
|
+
results: Array<UserSearchResult>;
|
|
2069
|
+
};
|
|
2070
|
+
type UserSearchResult = {
|
|
2071
|
+
id: string;
|
|
2072
|
+
name: string;
|
|
2073
|
+
displayName: string | null;
|
|
2074
|
+
image: string | null;
|
|
2075
|
+
socials: Array<SocialAccount>;
|
|
2076
|
+
};
|
|
2077
|
+
type CreateDeveloperApiKeyResponse = {
|
|
2078
|
+
key: DeveloperApiKeyItem;
|
|
2079
|
+
secret: string;
|
|
2080
|
+
};
|
|
2081
|
+
type DeveloperApiKeyItem = {
|
|
2082
|
+
id: string;
|
|
2083
|
+
keyPrefix: string;
|
|
2084
|
+
scopes: Array<"developer:read" | "developer:apps" | "developer:pages">;
|
|
2085
|
+
createdAt: string;
|
|
2086
|
+
expiresAt: string | null;
|
|
2087
|
+
lastUsedAt: string | null;
|
|
2088
|
+
revokedAt: string | null;
|
|
2089
|
+
};
|
|
2090
|
+
type CreateDeveloperApiKey = {
|
|
2091
|
+
scopes: Array<"developer:read" | "developer:apps" | "developer:pages">;
|
|
2092
|
+
expiresAt?: string | null;
|
|
2093
|
+
};
|
|
2094
|
+
type DeveloperApiKeysResponse = {
|
|
2095
|
+
keys: Array<DeveloperApiKeyItem>;
|
|
2096
|
+
};
|
|
2097
|
+
type DeveloperOkResponse = {
|
|
2098
|
+
ok: true;
|
|
2099
|
+
};
|
|
2100
|
+
type DeveloperAppIdResponse = {
|
|
2101
|
+
id: string;
|
|
2102
|
+
};
|
|
2103
|
+
type CreateDeveloperApp = {
|
|
2104
|
+
name: DeveloperAppName;
|
|
2105
|
+
chains?: Array<CreateDeveloperAppChain>;
|
|
2106
|
+
};
|
|
2107
|
+
type DeveloperAppName = string;
|
|
2108
|
+
type CreateDeveloperAppChain = {
|
|
2109
|
+
chain: string;
|
|
2110
|
+
custody: "server";
|
|
2111
|
+
};
|
|
2112
|
+
type UpdateDeveloperApp = {
|
|
2113
|
+
name?: DeveloperAppName;
|
|
2114
|
+
slug?: AppPageSlug | null;
|
|
2115
|
+
logoUrl?: string | null;
|
|
2116
|
+
testAccess?: "private" | "public";
|
|
2117
|
+
redirectUris?: Array<string>;
|
|
2118
|
+
embedOrigins?: Array<EmbedOrigin>;
|
|
2119
|
+
acceptedCurrencies?: AcceptedCurrencies;
|
|
2120
|
+
paymentStatusWebhookUrl?: string | null;
|
|
2121
|
+
paymentStatusWebhookUrlTest?: string | null;
|
|
2122
|
+
};
|
|
2123
|
+
type EmbedOrigin = string;
|
|
2124
|
+
type AcceptedCurrencies = Array<PlatformCurrency>;
|
|
2125
|
+
type PlatformCurrency = "eth" | "tron";
|
|
2126
|
+
type DeveloperLogoUploadResponse = {
|
|
2127
|
+
logoUrl: string | null;
|
|
2128
|
+
};
|
|
2129
|
+
type DeveloperAppBalancesResponse = {
|
|
2130
|
+
appId: string;
|
|
2131
|
+
balances: Array<DeveloperAppBalanceItem>;
|
|
2132
|
+
};
|
|
2133
|
+
type DeveloperAppBalanceItem = {
|
|
2134
|
+
chain: string;
|
|
2135
|
+
token: string;
|
|
2136
|
+
tokenDecimals: number;
|
|
2137
|
+
lockedWei: string;
|
|
2138
|
+
unlockedWei: string;
|
|
2139
|
+
walletBalanceWei: string | null;
|
|
2140
|
+
};
|
|
2141
|
+
type DeveloperAppTronBalanceResponse = {
|
|
2142
|
+
appId: string;
|
|
2143
|
+
availableCents: number;
|
|
2144
|
+
lockedCents: number;
|
|
2145
|
+
totalCents: number;
|
|
2146
|
+
};
|
|
2147
|
+
type DeveloperAppEarningsResponse = {
|
|
2148
|
+
appId: string;
|
|
2149
|
+
range: string;
|
|
2150
|
+
bucketSecs: number;
|
|
2151
|
+
windowSecs: number;
|
|
2152
|
+
chain: string | null;
|
|
2153
|
+
buckets: Array<DeveloperAppEarningsBucket>;
|
|
2154
|
+
};
|
|
2155
|
+
type DeveloperAppEarningsBucket = {
|
|
2156
|
+
ts: string;
|
|
2157
|
+
sumCents: number;
|
|
2158
|
+
paymentCount: number;
|
|
2159
|
+
};
|
|
2160
|
+
type DeveloperAppPlaytimeResponse = {
|
|
2161
|
+
appId: string;
|
|
2162
|
+
range: string;
|
|
2163
|
+
bucketSecs: number;
|
|
2164
|
+
windowSecs: number;
|
|
2165
|
+
buckets: Array<DeveloperAppPlaytimeBucket>;
|
|
2166
|
+
};
|
|
2167
|
+
type DeveloperAppPlaytimeBucket = {
|
|
2168
|
+
ts: string;
|
|
2169
|
+
sessionCount: number;
|
|
2170
|
+
uniquePlayerCount: number;
|
|
2171
|
+
totalDurationSeconds: number;
|
|
2172
|
+
};
|
|
2173
|
+
type DeveloperAppOverviewResponse = {
|
|
2174
|
+
appId: string;
|
|
2175
|
+
earnedCents: number;
|
|
2176
|
+
earningEventCount: number;
|
|
2177
|
+
distinctPayers: number;
|
|
2178
|
+
sessionCount: number;
|
|
2179
|
+
uniquePlayerCount: number;
|
|
2180
|
+
totalPlaytimeSeconds: number;
|
|
2181
|
+
};
|
|
2182
|
+
type DeveloperAppWalletsResponse = {
|
|
2183
|
+
appId: string;
|
|
2184
|
+
wallets: Array<DeveloperAppWalletItem>;
|
|
2185
|
+
};
|
|
2186
|
+
type DeveloperAppWalletItem = {
|
|
2187
|
+
chain: string;
|
|
2188
|
+
address: string;
|
|
2189
|
+
custody: "server" | null;
|
|
2190
|
+
walletId: string | null;
|
|
2191
|
+
autoSweepEnabled: boolean;
|
|
2192
|
+
sweepThresholdCents: number | null;
|
|
2193
|
+
};
|
|
2194
|
+
type DeveloperAppAutoSweepResponse = {
|
|
2195
|
+
appId: string;
|
|
2196
|
+
chain: string;
|
|
2197
|
+
autoSweepEnabled: boolean;
|
|
2198
|
+
sweepThresholdCents: number | null;
|
|
2199
|
+
};
|
|
2200
|
+
type DeveloperAppAutoSweepRequest = {
|
|
2201
|
+
enabled: boolean;
|
|
2202
|
+
thresholdCents?: number | null;
|
|
2203
|
+
};
|
|
2204
|
+
type DeveloperAppProvisionWalletResponse = {
|
|
2205
|
+
appId: string;
|
|
2206
|
+
chain: string;
|
|
2207
|
+
custody: "server";
|
|
2208
|
+
walletId: string;
|
|
2209
|
+
address: string;
|
|
2210
|
+
};
|
|
2211
|
+
type DeveloperAppWithdrawResponse = {
|
|
2212
|
+
appId: string;
|
|
2213
|
+
chain: string;
|
|
2214
|
+
token: string;
|
|
2215
|
+
txHash: string;
|
|
2216
|
+
amountWei: string;
|
|
2217
|
+
recipient: string;
|
|
2218
|
+
};
|
|
2219
|
+
type DeveloperAppConsolidateResponse = {
|
|
2220
|
+
appId: string;
|
|
2221
|
+
chain: string;
|
|
2222
|
+
recipient: string;
|
|
2223
|
+
transfers: Array<{
|
|
2224
|
+
token: string;
|
|
2225
|
+
txHash: string;
|
|
2226
|
+
amountWei: string;
|
|
2227
|
+
}>;
|
|
2228
|
+
};
|
|
2229
|
+
type RegenerateDeveloperAppKeyResponse = {
|
|
2230
|
+
key: DeveloperAppKeyItem;
|
|
2231
|
+
clientSecret: string;
|
|
2232
|
+
};
|
|
2233
|
+
type DeveloperAppKeyItem = {
|
|
2234
|
+
id: string;
|
|
2235
|
+
clientId: string;
|
|
2236
|
+
environment: "development" | "production";
|
|
2237
|
+
secretLast4: string;
|
|
2238
|
+
createdAt: string;
|
|
2239
|
+
lastUsedAt: string | null;
|
|
2240
|
+
};
|
|
2241
|
+
type CreateDeveloperProductionRequestResponse = {
|
|
2242
|
+
ok: true;
|
|
2243
|
+
status: "pending" | "approved";
|
|
2244
|
+
};
|
|
2245
|
+
type CreateDeveloperProductionRequest = {
|
|
2246
|
+
reason?: string;
|
|
2247
|
+
};
|
|
2248
|
+
type RegenerateDeveloperAppWebhookSecretResponse = {
|
|
2249
|
+
secret: string;
|
|
2250
|
+
secretLast4: string;
|
|
2251
|
+
};
|
|
2252
|
+
type DevAppealsResponse = {
|
|
2253
|
+
appeals: Array<DevAppealRow>;
|
|
2254
|
+
};
|
|
2255
|
+
type DevAppealRow = {
|
|
2256
|
+
appealId: string;
|
|
2257
|
+
paymentId: string;
|
|
2258
|
+
chain: string;
|
|
2259
|
+
vault: string;
|
|
2260
|
+
appellant: string;
|
|
2261
|
+
amount: string;
|
|
2262
|
+
token: string;
|
|
2263
|
+
status: "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
|
|
2264
|
+
reason: string | null;
|
|
2265
|
+
filedAt: string;
|
|
2266
|
+
resolvedAt: string | null;
|
|
2267
|
+
};
|
|
2268
|
+
type DevPendingDepositsResponse = {
|
|
2269
|
+
deposits: Array<DevPendingDepositRow>;
|
|
2270
|
+
};
|
|
2271
|
+
type DevPendingDepositRow = {
|
|
2272
|
+
paymentId: string;
|
|
2273
|
+
chain: string;
|
|
2274
|
+
vault: string;
|
|
2275
|
+
beneficiary: string;
|
|
2276
|
+
token: string;
|
|
2277
|
+
grossAmount: string;
|
|
2278
|
+
creditedAmount: string;
|
|
2279
|
+
vaultReleaseAt: string;
|
|
2280
|
+
signedAt: string;
|
|
2281
|
+
matured: boolean;
|
|
2282
|
+
hasActiveAppeal: boolean;
|
|
2283
|
+
};
|
|
2284
|
+
type DeveloperTronBalanceSummaryResponse = {
|
|
2285
|
+
appCount: number;
|
|
2286
|
+
availableCents: number;
|
|
2287
|
+
lockedCents: number;
|
|
2288
|
+
totalCents: number;
|
|
2289
|
+
};
|
|
2290
|
+
type DeveloperAppParticipantsResponse = {
|
|
2291
|
+
participants: Array<DeveloperAppParticipant>;
|
|
2292
|
+
};
|
|
2293
|
+
type DeveloperAppParticipant = {
|
|
2294
|
+
userId: string;
|
|
2295
|
+
status: "invited" | "accepted" | "revoked";
|
|
2296
|
+
name: string | null;
|
|
2297
|
+
email: string | null;
|
|
2298
|
+
image: string | null;
|
|
2299
|
+
invitedAt: string;
|
|
2300
|
+
respondedAt: string | null;
|
|
2301
|
+
};
|
|
2302
|
+
type InviteDeveloperAppParticipant = {
|
|
2303
|
+
identifier: string;
|
|
2304
|
+
};
|
|
2305
|
+
type DeveloperInvitesResponse = {
|
|
2306
|
+
invites: Array<DeveloperInvite>;
|
|
2307
|
+
};
|
|
2308
|
+
type DeveloperInvite = {
|
|
2309
|
+
appId: string;
|
|
2310
|
+
appName: string;
|
|
2311
|
+
appLogoUrl: string | null;
|
|
2312
|
+
status: "invited" | "accepted" | "revoked";
|
|
2313
|
+
invitedAt: string;
|
|
2314
|
+
};
|
|
2315
|
+
type DeveloperMeStatus = {
|
|
2316
|
+
roleStatus: "none" | "pending" | "approved" | "rejected" | "cancelled";
|
|
2317
|
+
latestRequest: DeveloperRequestItem;
|
|
2318
|
+
profile: DeveloperProfile | null;
|
|
2319
|
+
apps: Array<DeveloperAppItem>;
|
|
2320
|
+
};
|
|
2321
|
+
type DeveloperRequestItem = {
|
|
2322
|
+
id: string;
|
|
2323
|
+
userId: string;
|
|
2324
|
+
user: DeveloperRequestSubject;
|
|
2325
|
+
kind: "role" | "production";
|
|
2326
|
+
status: "pending" | "approved" | "rejected" | "cancelled";
|
|
2327
|
+
appId: string | null;
|
|
2328
|
+
payload: {
|
|
2329
|
+
kind: "role";
|
|
2330
|
+
data: DeveloperRoleRequestPayload;
|
|
2331
|
+
} | {
|
|
2332
|
+
kind: "production";
|
|
2333
|
+
data: DeveloperProductionRequestPayload;
|
|
2334
|
+
};
|
|
2335
|
+
reviewedBy: string | null;
|
|
2336
|
+
reviewedAt: string | null;
|
|
2337
|
+
reviewNotes: string | null;
|
|
2338
|
+
createdAt: string;
|
|
2339
|
+
updatedAt: string;
|
|
2340
|
+
} | null;
|
|
2341
|
+
type DeveloperRequestSubject = {
|
|
2342
|
+
id: string;
|
|
2343
|
+
displayName: string | null;
|
|
2344
|
+
email: string | null;
|
|
2345
|
+
} | null;
|
|
2346
|
+
type DeveloperRoleRequestPayload = {
|
|
2347
|
+
policyVersion: string;
|
|
2348
|
+
policyAcceptedAt: string;
|
|
2349
|
+
logoUrl: string | null;
|
|
2350
|
+
email: string | null;
|
|
2351
|
+
xHandle: XHandle;
|
|
2352
|
+
teamName: TeamName;
|
|
2353
|
+
projectDescription: ProjectDescription;
|
|
2354
|
+
};
|
|
2355
|
+
type TeamName = string | null;
|
|
2356
|
+
type ProjectDescription = string | null;
|
|
2357
|
+
type DeveloperProductionRequestPayload = {
|
|
2358
|
+
reason?: string;
|
|
2359
|
+
};
|
|
2360
|
+
type DeveloperAppItem = {
|
|
2361
|
+
id: string;
|
|
2362
|
+
name: DeveloperAppName;
|
|
2363
|
+
slug: AppPageSlug | null;
|
|
2364
|
+
logoUrl: string | null;
|
|
2365
|
+
environment: "development" | "production";
|
|
2366
|
+
productionApprovedAt: string | null;
|
|
2367
|
+
testAccess: "private" | "public";
|
|
2368
|
+
createdAt: string;
|
|
2369
|
+
redirectUris: Array<string>;
|
|
2370
|
+
embedOrigins: Array<EmbedOrigin>;
|
|
2371
|
+
acceptedCurrencies: AcceptedCurrencies;
|
|
2372
|
+
payoutAddresses: Array<DeveloperAppPayoutAddressItem>;
|
|
2373
|
+
keys: Array<DeveloperAppKeyItem>;
|
|
2374
|
+
pendingProductionRequestId: string | null;
|
|
2375
|
+
paymentStatusWebhookUrl: string | null;
|
|
2376
|
+
paymentStatusWebhookSecretLast4: string | null;
|
|
2377
|
+
paymentStatusWebhookUrlTest: string | null;
|
|
2378
|
+
paymentStatusWebhookSecretLast4Test: string | null;
|
|
2379
|
+
};
|
|
2380
|
+
type DeveloperAppPayoutAddressItem = {
|
|
2381
|
+
chain: string;
|
|
2382
|
+
address: string;
|
|
2383
|
+
};
|
|
2384
|
+
type UpdateDeveloperProfile = {
|
|
2385
|
+
studioName?: string | null;
|
|
2386
|
+
studioUrl?: string | null;
|
|
2387
|
+
studioXHandle?: XHandle;
|
|
2388
|
+
githubUrl?: GitHubUrl;
|
|
2389
|
+
logoUrl?: string | null;
|
|
2390
|
+
};
|
|
2391
|
+
type CreateDeveloperRoleRequest = {
|
|
2392
|
+
acceptPolicy: true;
|
|
2393
|
+
logoUrl?: string;
|
|
2394
|
+
email?: string;
|
|
2395
|
+
teamName?: TeamName;
|
|
2396
|
+
projectDescription?: ProjectDescription;
|
|
2397
|
+
};
|
|
2398
|
+
type AppPageDraft = {
|
|
2399
|
+
appId: string;
|
|
2400
|
+
slug: AppPageSlug | null;
|
|
2401
|
+
status: "draft" | "pending_review" | "published" | "hidden";
|
|
2402
|
+
categories: AppPageCategories;
|
|
2403
|
+
tagline: AppPageTagline | null;
|
|
2404
|
+
bannerUrl: string | null;
|
|
2405
|
+
thumbnailUrl: string | null;
|
|
2406
|
+
thumbnailVideoUrl: string | null;
|
|
2407
|
+
playUrl: string | null;
|
|
2408
|
+
discordUrl: string | null;
|
|
2409
|
+
twitterUrl: string | null;
|
|
2410
|
+
redditUrl: string | null;
|
|
2411
|
+
telegramUrl: string | null;
|
|
2412
|
+
gallery: AppPageGallery;
|
|
2413
|
+
chapters: AppPageChapters;
|
|
2414
|
+
links: AppPageLinks;
|
|
2415
|
+
platforms: AppPagePlatforms;
|
|
2416
|
+
gameType: AppPageGameType;
|
|
2417
|
+
ageRating: AppPageAgeRating;
|
|
2418
|
+
languages: AppPageLanguages;
|
|
2419
|
+
releaseStatus: AppPageReleaseStatus;
|
|
2420
|
+
firstPublishedAt: string | null;
|
|
2421
|
+
reviewedAt: string | null;
|
|
2422
|
+
reviewNotes: string | null;
|
|
2423
|
+
hiddenAt: string | null;
|
|
2424
|
+
hiddenReasonPublic: string | null;
|
|
2425
|
+
pendingReview: boolean;
|
|
2426
|
+
};
|
|
2427
|
+
type UpdateAppPage = {
|
|
2428
|
+
categories?: AppPageCategories;
|
|
2429
|
+
tagline?: AppPageTagline | null;
|
|
2430
|
+
bannerUrl?: string | null;
|
|
2431
|
+
thumbnailUrl?: string | null;
|
|
2432
|
+
thumbnailVideoUrl?: string | null;
|
|
2433
|
+
playUrl?: string | null;
|
|
2434
|
+
discordUrl?: string | null;
|
|
2435
|
+
twitterUrl?: string | null;
|
|
2436
|
+
redditUrl?: string | null;
|
|
2437
|
+
telegramUrl?: string | null;
|
|
2438
|
+
gallery?: AppPageGallery;
|
|
2439
|
+
chapters?: AppPageChapters;
|
|
2440
|
+
links?: AppPageLinks;
|
|
2441
|
+
platforms?: AppPagePlatforms;
|
|
2442
|
+
gameType?: AppPageGameType;
|
|
2443
|
+
ageRating?: AppPageAgeRating;
|
|
2444
|
+
languages?: AppPageLanguages;
|
|
2445
|
+
releaseStatus?: AppPageReleaseStatus;
|
|
2446
|
+
};
|
|
2447
|
+
type AppPageGalleryUploadResponse = {
|
|
2448
|
+
url: string;
|
|
2449
|
+
};
|
|
2450
|
+
type AdminActivePlayersResponse = {
|
|
2451
|
+
players: Array<AdminActivePlayer>;
|
|
2452
|
+
total: number;
|
|
2453
|
+
liveCount: number;
|
|
2454
|
+
generatedAt: string;
|
|
2455
|
+
};
|
|
2456
|
+
type AdminActivePlayer = {
|
|
2457
|
+
playSessionId: string;
|
|
2458
|
+
userId: string;
|
|
2459
|
+
appId: string;
|
|
2460
|
+
status: "pending" | "active";
|
|
2461
|
+
userHalfFresh: boolean;
|
|
2462
|
+
gameHalfFresh: boolean;
|
|
2463
|
+
active: boolean;
|
|
2464
|
+
startedAt: string;
|
|
2465
|
+
activatedAt: string | null;
|
|
2466
|
+
lastSeenAt: string | null;
|
|
2467
|
+
};
|
|
2468
|
+
type ListAdminsResponse = {
|
|
2469
|
+
admins: Array<AdminUser>;
|
|
2470
|
+
};
|
|
2471
|
+
type AdminUser = {
|
|
2472
|
+
id: string;
|
|
2473
|
+
email: string | null;
|
|
2474
|
+
role: AdminRole;
|
|
2475
|
+
addedBy: string | null;
|
|
2476
|
+
addedAt: string;
|
|
2477
|
+
lastAccessedAt: string | null;
|
|
2478
|
+
};
|
|
2479
|
+
type AdminMutationResponse = {
|
|
2480
|
+
id: string;
|
|
2481
|
+
};
|
|
2482
|
+
type AddAdminRequest = {
|
|
2483
|
+
email: string;
|
|
2484
|
+
role?: AdminRole;
|
|
2485
|
+
};
|
|
2486
|
+
type AdminRoleChangeResponse = {
|
|
2487
|
+
id: string;
|
|
2488
|
+
role: AdminRole;
|
|
2489
|
+
};
|
|
2490
|
+
type UpdateAdminRoleRequest = {
|
|
2491
|
+
role: AdminRole;
|
|
2492
|
+
};
|
|
2493
|
+
type AdminUserListResponse = {
|
|
2494
|
+
users: Array<AdminUserListItem>;
|
|
2495
|
+
total: number;
|
|
2496
|
+
offset: number;
|
|
2497
|
+
limit: number;
|
|
2498
|
+
};
|
|
2499
|
+
type AdminUserListItem = {
|
|
2500
|
+
id: string;
|
|
2501
|
+
name: string;
|
|
2502
|
+
displayName: string | null;
|
|
2503
|
+
email: string | null;
|
|
2504
|
+
createdAt: string;
|
|
2505
|
+
bannedAt: string | null;
|
|
2506
|
+
deletedAt: string | null;
|
|
2507
|
+
};
|
|
2508
|
+
type AdminUserBanResponse = {
|
|
2509
|
+
id: string;
|
|
2510
|
+
banned: boolean;
|
|
2511
|
+
};
|
|
2512
|
+
type AdminUserBanRequest = {
|
|
2513
|
+
banned: boolean;
|
|
2514
|
+
reason?: string;
|
|
2515
|
+
};
|
|
2516
|
+
type AdminAuditListResponse = {
|
|
2517
|
+
rows: Array<AdminAuditListItem>;
|
|
2518
|
+
total: number;
|
|
2519
|
+
offset: number;
|
|
2520
|
+
limit: number;
|
|
2521
|
+
};
|
|
2522
|
+
type AdminAuditListItem = {
|
|
2523
|
+
id: string;
|
|
2524
|
+
actorId: string | null;
|
|
2525
|
+
actorKind: "user" | "system" | "service";
|
|
2526
|
+
action: string;
|
|
2527
|
+
targetType: string;
|
|
2528
|
+
targetId: string;
|
|
2529
|
+
purpose: string;
|
|
2530
|
+
legalBasis: "consent" | "contract" | "legitimate-interest" | "legal-obligation" | "vital-interest" | "public-task";
|
|
2531
|
+
occurredAt: string;
|
|
2532
|
+
attributes: {
|
|
2533
|
+
[key: string]: unknown;
|
|
2534
|
+
};
|
|
2535
|
+
traceId: string | null;
|
|
2536
|
+
};
|
|
2537
|
+
type ListDeveloperRequestsResponse = {
|
|
2538
|
+
requests: Array<DeveloperRequestItem>;
|
|
2539
|
+
};
|
|
2540
|
+
type ReviewDeveloperRequestResponse = {
|
|
2541
|
+
id: string;
|
|
2542
|
+
status: "pending" | "approved" | "rejected" | "cancelled";
|
|
2543
|
+
};
|
|
2544
|
+
type ReviewDeveloperRequest = {
|
|
2545
|
+
decision: "approve" | "reject";
|
|
2546
|
+
notes?: string;
|
|
2547
|
+
};
|
|
2548
|
+
type AdminDeveloperListResponse = {
|
|
2549
|
+
developers: Array<AdminDeveloperListItem>;
|
|
2550
|
+
};
|
|
2551
|
+
type AdminDeveloperListItem = {
|
|
2552
|
+
userId: string;
|
|
2553
|
+
email: string;
|
|
2554
|
+
displayName: string | null;
|
|
2555
|
+
image: string | null;
|
|
2556
|
+
studio: DeveloperProfile | null;
|
|
2557
|
+
apps: Array<AdminDeveloperAppItem>;
|
|
2558
|
+
grantedAt: string | null;
|
|
2559
|
+
};
|
|
2560
|
+
type AdminDeveloperAppItem = {
|
|
2561
|
+
id: string;
|
|
2562
|
+
name: string;
|
|
2563
|
+
environment: "development" | "production";
|
|
2564
|
+
logoUrl: string | null;
|
|
2565
|
+
productionApprovedAt: string | null;
|
|
2566
|
+
createdAt: string;
|
|
2567
|
+
};
|
|
2568
|
+
type AdminAppPageListResponse = {
|
|
2569
|
+
items: Array<AdminAppPageItem>;
|
|
2570
|
+
};
|
|
2571
|
+
type AdminAppPageItem = {
|
|
2572
|
+
appId: string;
|
|
2573
|
+
appName: string;
|
|
2574
|
+
ownerDisplayName: string | null;
|
|
2575
|
+
ownerImage: string | null;
|
|
2576
|
+
ownerUserId: string;
|
|
2577
|
+
ownerEmail: string | null;
|
|
2578
|
+
appLogoUrl: string | null;
|
|
2579
|
+
slug: string | null;
|
|
2580
|
+
status: "draft" | "pending_review" | "published" | "hidden";
|
|
2581
|
+
categories: AppPageCategories;
|
|
2582
|
+
tagline: string | null;
|
|
2583
|
+
submittedAt: string | null;
|
|
2584
|
+
firstPublishedAt: string | null;
|
|
2585
|
+
hiddenAt: string | null;
|
|
2586
|
+
hiddenReasonInternal: string | null;
|
|
2587
|
+
pendingChangesSubmittedAt: string | null;
|
|
2588
|
+
};
|
|
2589
|
+
type AdminAppPageStatusResponse = {
|
|
2590
|
+
status: "draft" | "pending_review" | "published" | "hidden";
|
|
2591
|
+
};
|
|
2592
|
+
type HideAppPage = {
|
|
2593
|
+
reasonPublic: string;
|
|
2594
|
+
reasonInternal?: string;
|
|
2595
|
+
};
|
|
2596
|
+
type ReviewAppPage = {
|
|
2597
|
+
decision: "approve";
|
|
2598
|
+
} | {
|
|
2599
|
+
decision: "reject";
|
|
2600
|
+
notes: string;
|
|
2601
|
+
};
|
|
2602
|
+
type AdminAppPageDiffResponse = {
|
|
2603
|
+
appId: string;
|
|
2604
|
+
submittedAt: string | null;
|
|
2605
|
+
changes: Array<AdminAppPageDiffField>;
|
|
2606
|
+
};
|
|
2607
|
+
type AdminAppPageDiffField = {
|
|
2608
|
+
field: string;
|
|
2609
|
+
label: string;
|
|
2610
|
+
from: string;
|
|
2611
|
+
to: string;
|
|
2612
|
+
};
|
|
2613
|
+
type PlatformFeesResponse = {
|
|
2614
|
+
purchaseFeeBps: number;
|
|
2615
|
+
stakeFeeBps: number;
|
|
2616
|
+
updatedAt: string;
|
|
2617
|
+
updatedBy: string | null;
|
|
2618
|
+
};
|
|
2619
|
+
type UpdatePlatformFeesResponse = {
|
|
2620
|
+
purchaseFeeBps: number;
|
|
2621
|
+
stakeFeeBps: number;
|
|
2622
|
+
updatedAt: string;
|
|
2623
|
+
updatedBy: string | null;
|
|
2624
|
+
envelopes: Array<PlatformFeeEnvelope>;
|
|
2625
|
+
};
|
|
2626
|
+
type PlatformFeeEnvelope = {
|
|
2627
|
+
target: "purchase";
|
|
2628
|
+
envelope: CalldataEnvelope;
|
|
2629
|
+
};
|
|
2630
|
+
type CalldataEnvelope = {
|
|
2631
|
+
chain: string;
|
|
2632
|
+
chainId: number;
|
|
2633
|
+
to: string;
|
|
2634
|
+
calldataHex: string;
|
|
2635
|
+
};
|
|
2636
|
+
type UpdatePlatformFeesRequest = {
|
|
2637
|
+
purchaseFeeBps?: number;
|
|
2638
|
+
stakeFeeBps?: number;
|
|
2639
|
+
};
|
|
2640
|
+
type AppFeeConfigResponse = {
|
|
2641
|
+
appId: string;
|
|
2642
|
+
platformFeeBps: number | null;
|
|
2643
|
+
rakeCapBps: number | null;
|
|
2644
|
+
effectivePlatformFeeBps: number;
|
|
2645
|
+
effectiveRakeCapBps: number;
|
|
2646
|
+
updatedAt: string | null;
|
|
2647
|
+
updatedBy: string | null;
|
|
2648
|
+
};
|
|
2649
|
+
type UpdateAppFeeConfigRequest = {
|
|
2650
|
+
platformFeeBps?: number | null;
|
|
2651
|
+
rakeCapBps?: number | null;
|
|
2652
|
+
};
|
|
2653
|
+
type SetProcessorWhitelistRequest = {
|
|
2654
|
+
chain: string;
|
|
2655
|
+
vaultAddress: string;
|
|
2656
|
+
processorAddress: string;
|
|
2657
|
+
action: "add" | "remove";
|
|
2658
|
+
};
|
|
2659
|
+
type RotateProcessorTreasuryRequest = {
|
|
2660
|
+
chain: string;
|
|
2661
|
+
processorAddress: string;
|
|
2662
|
+
newTreasury: string;
|
|
2663
|
+
};
|
|
2664
|
+
type AppealBlacklistEntry = {
|
|
2665
|
+
chain: string;
|
|
2666
|
+
walletAddress: string;
|
|
2667
|
+
reason: string;
|
|
2668
|
+
flaggedBy: string;
|
|
2669
|
+
createdAt: string;
|
|
2670
|
+
updatedAt: string;
|
|
2671
|
+
};
|
|
2672
|
+
type AppealBlacklistAddRequest = {
|
|
2673
|
+
chain: string;
|
|
2674
|
+
walletAddress: string;
|
|
2675
|
+
reason: string;
|
|
2676
|
+
};
|
|
2677
|
+
type AppealBlacklistRemoveResponse = {
|
|
2678
|
+
chain: string;
|
|
2679
|
+
walletAddress: string;
|
|
2680
|
+
removed: true;
|
|
2681
|
+
};
|
|
2682
|
+
type AppealBlacklistRemoveRequest = {
|
|
2683
|
+
chain: string;
|
|
2684
|
+
walletAddress: string;
|
|
2685
|
+
};
|
|
2686
|
+
type AppealBlacklistListResponse = {
|
|
2687
|
+
entries: Array<AppealBlacklistEntry>;
|
|
2688
|
+
};
|
|
2689
|
+
type SetOperatorRequest = {
|
|
2690
|
+
chain: string;
|
|
2691
|
+
target: "router" | "credit_vault" | "platform_vault";
|
|
2692
|
+
newOperator: string;
|
|
2693
|
+
};
|
|
2694
|
+
type PauseRequest = {
|
|
2695
|
+
chain: string;
|
|
2696
|
+
target: "router" | "credit_vault" | "platform_vault";
|
|
2697
|
+
action: "pause" | "unpause";
|
|
2698
|
+
};
|
|
2699
|
+
type SetDefaultWithdrawLockRequest = {
|
|
2700
|
+
chain: string;
|
|
2701
|
+
vaultAddress: string;
|
|
2702
|
+
lockSeconds: number;
|
|
2703
|
+
};
|
|
2704
|
+
type SetWithdrawLockOverrideRequest = {
|
|
2705
|
+
chain: string;
|
|
2706
|
+
account: string;
|
|
2707
|
+
lockSeconds: number;
|
|
2708
|
+
};
|
|
2709
|
+
type ListAppealsResponse = {
|
|
2710
|
+
appeals: Array<AppealStatusRow>;
|
|
2711
|
+
nextCursorFiledAt: string | null;
|
|
2712
|
+
};
|
|
2713
|
+
type AppealStatusRow = {
|
|
2714
|
+
appealId: string;
|
|
2715
|
+
paymentId: string;
|
|
2716
|
+
chain: string;
|
|
2717
|
+
vault: string;
|
|
2718
|
+
appellant: string;
|
|
2719
|
+
amount: string;
|
|
2720
|
+
token: string;
|
|
2721
|
+
status: "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
|
|
2722
|
+
reason: string | null;
|
|
2723
|
+
filedAt: string;
|
|
2724
|
+
resolvedAt: string | null;
|
|
2725
|
+
resolvedBy: string | null;
|
|
2726
|
+
resolutionNotes: string | null;
|
|
2727
|
+
};
|
|
2728
|
+
type AppealRoomView = {
|
|
2729
|
+
appealId: string;
|
|
2730
|
+
threadId: string | null;
|
|
2731
|
+
status: AppealRoomStatus;
|
|
2732
|
+
readOnly: boolean;
|
|
2733
|
+
canResolve: boolean;
|
|
2734
|
+
detail: AppealRoomDetail;
|
|
2735
|
+
messages: Array<AppealRoomMessage>;
|
|
2736
|
+
};
|
|
2737
|
+
type AppealRoomStatus = "pending_onchain" | "open" | "resolved_refund" | "resolved_dismiss" | "cancelled" | "force_cancelled";
|
|
2738
|
+
type AppealRoomDetail = {
|
|
2739
|
+
source: AppealRoomSource;
|
|
2740
|
+
chain: string;
|
|
2741
|
+
amount: string;
|
|
2742
|
+
token: string;
|
|
2743
|
+
vault: string;
|
|
2744
|
+
depositId: string | null;
|
|
2745
|
+
paymentId: string | null;
|
|
2746
|
+
appellant: string;
|
|
2747
|
+
appellantUserId: string | null;
|
|
2748
|
+
respondent: string | null;
|
|
2749
|
+
respondentUserId: string | null;
|
|
2750
|
+
reason: string | null;
|
|
2751
|
+
filedAt: string;
|
|
2752
|
+
resolvedAt: string | null;
|
|
2753
|
+
resolution: {
|
|
2754
|
+
resolutionId: string;
|
|
2755
|
+
outcome: number;
|
|
2756
|
+
deadline: number;
|
|
2757
|
+
signature: string;
|
|
2758
|
+
} | null;
|
|
2759
|
+
refundClaimedAt: string | null;
|
|
2760
|
+
};
|
|
2761
|
+
type AppealRoomSource = "purchase" | "pot" | "matured";
|
|
2762
|
+
type AppealRoomMessage = {
|
|
2763
|
+
id: string;
|
|
2764
|
+
senderUserId: string | null;
|
|
2765
|
+
senderRole: AppealRoomSenderRole;
|
|
2766
|
+
body: string | null;
|
|
2767
|
+
attachments: Array<MessageAttachment>;
|
|
2768
|
+
sentAt: string;
|
|
2769
|
+
};
|
|
2770
|
+
type AppealRoomSenderRole = "party" | "admin" | "system";
|
|
2771
|
+
type AppealRoomPostResponse = {
|
|
2772
|
+
message: AppealRoomMessage;
|
|
2773
|
+
};
|
|
2774
|
+
type AppealRoomPostRequest = {
|
|
2775
|
+
body?: string;
|
|
2776
|
+
attachmentIds?: Array<string>;
|
|
2777
|
+
};
|
|
2778
|
+
type AppealResolveSignedResponse = {
|
|
2779
|
+
appealId: string;
|
|
2780
|
+
resolutionId: string;
|
|
2781
|
+
chain: string;
|
|
2782
|
+
chainId: number;
|
|
2783
|
+
vault: string;
|
|
2784
|
+
outcome: number;
|
|
2785
|
+
deadline: number;
|
|
2786
|
+
signature: string;
|
|
2787
|
+
status: "resolved_refund" | "resolved_dismiss";
|
|
2788
|
+
};
|
|
2789
|
+
type AppealResolveRequest = {
|
|
2790
|
+
decision: "refund" | "dismiss";
|
|
2791
|
+
notes?: string;
|
|
2792
|
+
};
|
|
2793
|
+
type AppealFileResponse = {
|
|
2794
|
+
appealId: string;
|
|
2795
|
+
paymentId: string;
|
|
2796
|
+
chain: string;
|
|
2797
|
+
chainId: number;
|
|
2798
|
+
vault: string;
|
|
2799
|
+
appellant: string;
|
|
2800
|
+
amount: string;
|
|
2801
|
+
deadline: number;
|
|
2802
|
+
signature: string;
|
|
2803
|
+
};
|
|
2804
|
+
type AppealFileRequest = {
|
|
2805
|
+
paymentId: string;
|
|
2806
|
+
amount: string;
|
|
2807
|
+
reason: string;
|
|
2808
|
+
};
|
|
2809
|
+
type AppealPotLegFileRequest = {
|
|
2810
|
+
legId: string;
|
|
2811
|
+
reason: string;
|
|
2812
|
+
};
|
|
2813
|
+
type OauthPaymentPayoutResponse = ({
|
|
2814
|
+
kind: "direct";
|
|
2815
|
+
} & OauthPaymentPayoutDirect) | ({
|
|
2816
|
+
kind: "pull";
|
|
2817
|
+
} & OauthPaymentPayoutPull);
|
|
2818
|
+
type OauthPaymentPayoutDirect = {
|
|
2819
|
+
kind: "direct";
|
|
2820
|
+
txHash: string;
|
|
2821
|
+
blockNumber: string;
|
|
2822
|
+
recipient: string;
|
|
2823
|
+
amount: string;
|
|
2824
|
+
};
|
|
2825
|
+
type OauthPaymentPayoutPull = {
|
|
2826
|
+
kind: "pull";
|
|
2827
|
+
txHash: string;
|
|
2828
|
+
blockNumber: string;
|
|
2829
|
+
recipient: string;
|
|
2830
|
+
amount: string;
|
|
2831
|
+
};
|
|
2832
|
+
type OauthPaymentPayoutRequest = {
|
|
2833
|
+
chain: string;
|
|
2834
|
+
token: string;
|
|
2835
|
+
amount: string;
|
|
2836
|
+
recipient?: string;
|
|
2837
|
+
recipientUserId?: string;
|
|
2838
|
+
metadata?: PaymentMetadata;
|
|
2839
|
+
};
|
|
2840
|
+
type OauthPaymentDistributeResponse = {
|
|
2841
|
+
distributionId: string;
|
|
2842
|
+
txHash: string;
|
|
2843
|
+
blockNumber: string;
|
|
2844
|
+
potId: string;
|
|
2845
|
+
closePot: boolean;
|
|
2846
|
+
legs: Array<{
|
|
2847
|
+
recipient: string;
|
|
2848
|
+
amount: string;
|
|
2849
|
+
settlement: "instant" | "locked";
|
|
2850
|
+
}>;
|
|
2851
|
+
};
|
|
2852
|
+
type OauthPaymentDistributeRequest = {
|
|
2853
|
+
chain: string;
|
|
2854
|
+
token: string;
|
|
2855
|
+
potId: string;
|
|
2856
|
+
closePot?: boolean;
|
|
2857
|
+
legs: Array<{
|
|
2858
|
+
recipient?: string;
|
|
2859
|
+
recipientUserId?: string;
|
|
2860
|
+
amount: string;
|
|
2861
|
+
settlement?: "instant" | "locked";
|
|
2862
|
+
}>;
|
|
2863
|
+
metadata?: PaymentMetadata;
|
|
2864
|
+
};
|
|
2865
|
+
type OauthPaymentCancelPotResponse = {
|
|
2866
|
+
potId: string;
|
|
2867
|
+
txHash: string;
|
|
2868
|
+
blockNumber: string;
|
|
2869
|
+
};
|
|
2870
|
+
type OauthPaymentCancelPotRequest = {
|
|
2871
|
+
chain: string;
|
|
2872
|
+
token: string;
|
|
2873
|
+
potId: string;
|
|
2874
|
+
};
|
|
2875
|
+
type GetOauthPaymentsPriceData = {
|
|
2876
|
+
body?: never;
|
|
2877
|
+
path?: never;
|
|
2878
|
+
query: {
|
|
2879
|
+
chain: string;
|
|
2880
|
+
token: string;
|
|
2881
|
+
amount?: string;
|
|
2882
|
+
usdCents?: number | null;
|
|
2883
|
+
};
|
|
2884
|
+
url: "/oauth/payments/price";
|
|
2885
|
+
};
|
|
2886
|
+
type PostMeDeveloperAppsByAppIdPageBannerResponses = {
|
|
2887
|
+
/**
|
|
2888
|
+
* Versioned public URL for the stored banner
|
|
2889
|
+
*/
|
|
2890
|
+
200: {
|
|
2891
|
+
bannerUrl: string;
|
|
2892
|
+
};
|
|
2893
|
+
};
|
|
2894
|
+
type PostMeDeveloperAppsByAppIdPageBannerResponse = PostMeDeveloperAppsByAppIdPageBannerResponses[keyof PostMeDeveloperAppsByAppIdPageBannerResponses];
|
|
2895
|
+
type PostMeDeveloperAppsByAppIdPageThumbnailResponses = {
|
|
2896
|
+
/**
|
|
2897
|
+
* Versioned public URL for the stored thumbnail
|
|
2898
|
+
*/
|
|
2899
|
+
200: {
|
|
2900
|
+
thumbnailUrl: string;
|
|
2901
|
+
};
|
|
2902
|
+
};
|
|
2903
|
+
type PostMeDeveloperAppsByAppIdPageThumbnailResponse = PostMeDeveloperAppsByAppIdPageThumbnailResponses[keyof PostMeDeveloperAppsByAppIdPageThumbnailResponses];
|
|
2904
|
+
type PostMeDeveloperAppsByAppIdPageThumbnailVideoResponses = {
|
|
2905
|
+
/**
|
|
2906
|
+
* Versioned public URL for the stored thumbnail video
|
|
2907
|
+
*/
|
|
2908
|
+
200: {
|
|
2909
|
+
thumbnailVideoUrl: string;
|
|
2910
|
+
};
|
|
2911
|
+
};
|
|
2912
|
+
type PostMeDeveloperAppsByAppIdPageThumbnailVideoResponse = PostMeDeveloperAppsByAppIdPageThumbnailVideoResponses[keyof PostMeDeveloperAppsByAppIdPageThumbnailVideoResponses];
|
|
2913
|
+
//#endregion
|
|
2914
|
+
//#region src/account/avatar.d.ts
|
|
2915
|
+
declare function uploadAvatar(context: TransportContext, input: {
|
|
2916
|
+
readonly bearer: string;
|
|
2917
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
2918
|
+
readonly filename: string;
|
|
2919
|
+
readonly contentType: string;
|
|
2920
|
+
}): Promise<AuthUser>;
|
|
2921
|
+
declare function deleteAvatar(context: TransportContext, input: {
|
|
2922
|
+
readonly bearer: string;
|
|
2923
|
+
}): Promise<AuthUser>;
|
|
2924
|
+
//#endregion
|
|
2925
|
+
//#region src/account/giphy.d.ts
|
|
2926
|
+
declare function searchGiphy(context: TransportContext, input: {
|
|
2927
|
+
readonly bearer: string;
|
|
2928
|
+
readonly q: string;
|
|
2929
|
+
}): Promise<GiphySearchResponse>;
|
|
2930
|
+
//#endregion
|
|
2931
|
+
//#region src/account/payment-authorizations.d.ts
|
|
2932
|
+
declare function listPaymentAuthorizations(context: TransportContext, input: {
|
|
2933
|
+
readonly bearer: string;
|
|
2934
|
+
}): Promise<ListAppPaymentAuthorizationsResponse>;
|
|
2935
|
+
declare function updatePaymentAuthorization(context: TransportContext, input: {
|
|
2936
|
+
readonly bearer: string;
|
|
2937
|
+
readonly consentId: string;
|
|
2938
|
+
readonly body: UpdateAppPaymentAuthorization;
|
|
2939
|
+
}): Promise<void>;
|
|
2940
|
+
declare function revokePaymentAuthorization(context: TransportContext, input: {
|
|
2941
|
+
readonly bearer: string;
|
|
2942
|
+
readonly consentId: string;
|
|
2943
|
+
}): Promise<void>;
|
|
2944
|
+
//#endregion
|
|
2945
|
+
//#region src/account/presence-heartbeat.d.ts
|
|
2946
|
+
declare function sendPresenceHeartbeat(context: TransportContext, input: {
|
|
2947
|
+
readonly bearer: string;
|
|
2948
|
+
}): Promise<WebPresenceHeartbeatAck>;
|
|
2949
|
+
//#endregion
|
|
2950
|
+
//#region src/account/profile.d.ts
|
|
2951
|
+
declare function updateProfile(context: TransportContext, input: {
|
|
2952
|
+
readonly bearer: string;
|
|
2953
|
+
readonly body: ProfileUpdate;
|
|
2954
|
+
}): Promise<AuthUser>;
|
|
2955
|
+
//#endregion
|
|
2956
|
+
//#region src/admin/active-players.d.ts
|
|
2957
|
+
declare function listActivePlayers(context: TransportContext, input: {
|
|
2958
|
+
readonly bearer: string;
|
|
2959
|
+
}): Promise<AdminActivePlayersResponse>;
|
|
2960
|
+
//#endregion
|
|
2961
|
+
//#region src/admin/app-pages.d.ts
|
|
2962
|
+
declare function listAppPages(context: TransportContext, input: {
|
|
2963
|
+
readonly bearer: string;
|
|
2964
|
+
readonly status?: "draft" | "pending_review" | "published" | "hidden" | "all" | "pending_changes";
|
|
2965
|
+
}): Promise<AdminAppPageListResponse>;
|
|
2966
|
+
declare function getAppPageChanges(context: TransportContext, input: {
|
|
2967
|
+
readonly bearer: string;
|
|
2968
|
+
readonly appId: string;
|
|
2969
|
+
}): Promise<AdminAppPageDiffResponse>;
|
|
2970
|
+
declare function reviewAppPageChanges(context: TransportContext, input: {
|
|
2971
|
+
readonly bearer: string;
|
|
2972
|
+
readonly appId: string;
|
|
2973
|
+
readonly body: ReviewAppPage;
|
|
2974
|
+
}): Promise<AdminAppPageStatusResponse>;
|
|
2975
|
+
declare function hideAppPage(context: TransportContext, input: {
|
|
2976
|
+
readonly bearer: string;
|
|
2977
|
+
readonly appId: string;
|
|
2978
|
+
readonly body: HideAppPage;
|
|
2979
|
+
}): Promise<AdminAppPageStatusResponse>;
|
|
2980
|
+
declare function unhideAppPage(context: TransportContext, input: {
|
|
2981
|
+
readonly bearer: string;
|
|
2982
|
+
readonly appId: string;
|
|
2983
|
+
}): Promise<AdminAppPageStatusResponse>;
|
|
2984
|
+
declare function reviewAppPage(context: TransportContext, input: {
|
|
2985
|
+
readonly bearer: string;
|
|
2986
|
+
readonly appId: string;
|
|
2987
|
+
readonly body: ReviewAppPage;
|
|
2988
|
+
}): Promise<AdminAppPageStatusResponse>;
|
|
2989
|
+
//#endregion
|
|
2990
|
+
//#region src/admin/appeals.d.ts
|
|
2991
|
+
declare function listAppealQueue(context: TransportContext, input: {
|
|
2992
|
+
readonly bearer: string;
|
|
2993
|
+
readonly statuses?: readonly AppealStatusRow["status"][];
|
|
2994
|
+
readonly chain?: string;
|
|
2995
|
+
readonly cursorFiledAt?: string;
|
|
2996
|
+
readonly limit?: number;
|
|
2997
|
+
}): Promise<ListAppealsResponse>;
|
|
2998
|
+
declare function getAdminAppealRoom(context: TransportContext, input: {
|
|
2999
|
+
readonly bearer: string;
|
|
3000
|
+
readonly appealId: string;
|
|
3001
|
+
}): Promise<AppealRoomView>;
|
|
3002
|
+
declare function postAdminAppealRoomMessage(context: TransportContext, input: {
|
|
3003
|
+
readonly bearer: string;
|
|
3004
|
+
readonly appealId: string;
|
|
3005
|
+
readonly body: AppealRoomPostRequest;
|
|
3006
|
+
}): Promise<AppealRoomPostResponse>;
|
|
3007
|
+
declare function uploadAdminAppealRoomAttachment(context: TransportContext, input: {
|
|
3008
|
+
readonly bearer: string;
|
|
3009
|
+
readonly appealId: string;
|
|
3010
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3011
|
+
readonly filename: string;
|
|
3012
|
+
readonly contentType: string;
|
|
3013
|
+
}): Promise<UploadAttachmentResponse>;
|
|
3014
|
+
declare function resolveAppeal(context: TransportContext, input: {
|
|
3015
|
+
readonly bearer: string;
|
|
3016
|
+
readonly appealId: string;
|
|
3017
|
+
readonly body: AppealResolveRequest;
|
|
3018
|
+
}): Promise<AppealResolveSignedResponse>;
|
|
3019
|
+
//#endregion
|
|
3020
|
+
//#region src/admin/developers.d.ts
|
|
3021
|
+
declare function listDeveloperRequests(context: TransportContext, input: {
|
|
3022
|
+
readonly bearer: string;
|
|
3023
|
+
readonly status?: "pending" | "approved" | "rejected" | "cancelled";
|
|
3024
|
+
readonly kind?: "role" | "production";
|
|
3025
|
+
}): Promise<ListDeveloperRequestsResponse>;
|
|
3026
|
+
declare function reviewDeveloperRequest(context: TransportContext, input: {
|
|
3027
|
+
readonly bearer: string;
|
|
3028
|
+
readonly id: string;
|
|
3029
|
+
readonly body: ReviewDeveloperRequest;
|
|
3030
|
+
}): Promise<ReviewDeveloperRequestResponse>;
|
|
3031
|
+
declare function listDevelopers(context: TransportContext, input: {
|
|
3032
|
+
readonly bearer: string;
|
|
3033
|
+
}): Promise<AdminDeveloperListResponse>;
|
|
3034
|
+
//#endregion
|
|
3035
|
+
//#region src/admin/inventory-vault.d.ts
|
|
3036
|
+
declare function forceWithdrawVaultCustody(context: TransportContext, input: {
|
|
3037
|
+
readonly bearer: string;
|
|
3038
|
+
readonly custodyId: string;
|
|
3039
|
+
}): Promise<InventoryVaultForceWithdrawResponse>;
|
|
3040
|
+
//#endregion
|
|
3041
|
+
//#region src/admin/payments.d.ts
|
|
3042
|
+
declare function getPlatformFees(context: TransportContext, input: {
|
|
3043
|
+
readonly bearer: string;
|
|
3044
|
+
}): Promise<PlatformFeesResponse>;
|
|
3045
|
+
declare function updatePlatformFees(context: TransportContext, input: {
|
|
3046
|
+
readonly bearer: string;
|
|
3047
|
+
readonly body: UpdatePlatformFeesRequest;
|
|
3048
|
+
}): Promise<UpdatePlatformFeesResponse>;
|
|
3049
|
+
declare function getAppFeeConfig(context: TransportContext, input: {
|
|
3050
|
+
readonly bearer: string;
|
|
3051
|
+
readonly appId: string;
|
|
3052
|
+
}): Promise<AppFeeConfigResponse>;
|
|
3053
|
+
declare function updateAppFeeConfig(context: TransportContext, input: {
|
|
3054
|
+
readonly bearer: string;
|
|
3055
|
+
readonly appId: string;
|
|
3056
|
+
readonly body: UpdateAppFeeConfigRequest;
|
|
3057
|
+
}): Promise<AppFeeConfigResponse>;
|
|
3058
|
+
declare function setProcessorWhitelist(context: TransportContext, input: {
|
|
3059
|
+
readonly bearer: string;
|
|
3060
|
+
readonly body: SetProcessorWhitelistRequest;
|
|
3061
|
+
}): Promise<CalldataEnvelope>;
|
|
3062
|
+
declare function rotateProcessorTreasury(context: TransportContext, input: {
|
|
3063
|
+
readonly bearer: string;
|
|
3064
|
+
readonly processorId: string;
|
|
3065
|
+
readonly body: RotateProcessorTreasuryRequest;
|
|
3066
|
+
}): Promise<CalldataEnvelope>;
|
|
3067
|
+
declare function setVaultOperator(context: TransportContext, input: {
|
|
3068
|
+
readonly bearer: string;
|
|
3069
|
+
readonly vaultAddress: string;
|
|
3070
|
+
readonly body: SetOperatorRequest;
|
|
3071
|
+
}): Promise<CalldataEnvelope>;
|
|
3072
|
+
declare function setVaultPause(context: TransportContext, input: {
|
|
3073
|
+
readonly bearer: string;
|
|
3074
|
+
readonly vaultAddress: string;
|
|
3075
|
+
readonly body: PauseRequest;
|
|
3076
|
+
}): Promise<CalldataEnvelope>;
|
|
3077
|
+
declare function setVaultWithdrawLockDefault(context: TransportContext, input: {
|
|
3078
|
+
readonly bearer: string;
|
|
3079
|
+
readonly vaultAddress: string;
|
|
3080
|
+
readonly body: SetDefaultWithdrawLockRequest;
|
|
3081
|
+
}): Promise<CalldataEnvelope>;
|
|
3082
|
+
declare function setVaultWithdrawLockOverride(context: TransportContext, input: {
|
|
3083
|
+
readonly bearer: string;
|
|
3084
|
+
readonly vaultAddress: string;
|
|
3085
|
+
readonly body: SetWithdrawLockOverrideRequest;
|
|
3086
|
+
}): Promise<CalldataEnvelope>;
|
|
3087
|
+
declare function addAppealBlacklist(context: TransportContext, input: {
|
|
3088
|
+
readonly bearer: string;
|
|
3089
|
+
readonly body: AppealBlacklistAddRequest;
|
|
3090
|
+
}): Promise<AppealBlacklistEntry>;
|
|
3091
|
+
declare function removeAppealBlacklist(context: TransportContext, input: {
|
|
3092
|
+
readonly bearer: string;
|
|
3093
|
+
readonly body: AppealBlacklistRemoveRequest;
|
|
3094
|
+
}): Promise<AppealBlacklistRemoveResponse>;
|
|
3095
|
+
declare function listAppealBlacklist(context: TransportContext, input: {
|
|
3096
|
+
readonly bearer: string;
|
|
3097
|
+
readonly chain?: string;
|
|
3098
|
+
}): Promise<AppealBlacklistListResponse>;
|
|
3099
|
+
//#endregion
|
|
3100
|
+
//#region src/admin/tron-cashouts.d.ts
|
|
3101
|
+
declare function listTronCashoutQueue(context: TransportContext, input: {
|
|
3102
|
+
readonly bearer: string;
|
|
3103
|
+
readonly status?: AdminTronCashoutItem["status"];
|
|
3104
|
+
}): Promise<AdminTronCashoutListResponse>;
|
|
3105
|
+
declare function approveTronCashout(context: TransportContext, input: {
|
|
3106
|
+
readonly bearer: string;
|
|
3107
|
+
readonly id: string;
|
|
3108
|
+
}): Promise<AdminTronCashoutItem>;
|
|
3109
|
+
declare function rejectTronCashout(context: TransportContext, input: {
|
|
3110
|
+
readonly bearer: string;
|
|
3111
|
+
readonly id: string;
|
|
3112
|
+
readonly body: AdminTronCashoutRejectRequest;
|
|
3113
|
+
}): Promise<AdminTronCashoutItem>;
|
|
3114
|
+
//#endregion
|
|
3115
|
+
//#region src/admin/users.d.ts
|
|
3116
|
+
declare function listAdmins(context: TransportContext, input: {
|
|
3117
|
+
readonly bearer: string;
|
|
3118
|
+
}): Promise<ListAdminsResponse>;
|
|
3119
|
+
declare function addAdmin(context: TransportContext, input: {
|
|
3120
|
+
readonly bearer: string;
|
|
3121
|
+
readonly body: AddAdminRequest;
|
|
3122
|
+
}): Promise<AdminMutationResponse>;
|
|
3123
|
+
declare function updateAdminRole(context: TransportContext, input: {
|
|
3124
|
+
readonly bearer: string;
|
|
3125
|
+
readonly id: string;
|
|
3126
|
+
readonly body: UpdateAdminRoleRequest;
|
|
3127
|
+
}): Promise<AdminRoleChangeResponse>;
|
|
3128
|
+
declare function removeAdmin(context: TransportContext, input: {
|
|
3129
|
+
readonly bearer: string;
|
|
3130
|
+
readonly id: string;
|
|
3131
|
+
}): Promise<AdminMutationResponse>;
|
|
3132
|
+
declare function listUsers(context: TransportContext, input: {
|
|
3133
|
+
readonly bearer: string;
|
|
3134
|
+
readonly search?: string;
|
|
3135
|
+
readonly offset?: number;
|
|
3136
|
+
readonly limit?: number;
|
|
3137
|
+
}): Promise<AdminUserListResponse>;
|
|
3138
|
+
declare function updateUserBan(context: TransportContext, input: {
|
|
3139
|
+
readonly bearer: string;
|
|
3140
|
+
readonly id: string;
|
|
3141
|
+
readonly body: AdminUserBanRequest;
|
|
3142
|
+
}): Promise<AdminUserBanResponse>;
|
|
3143
|
+
declare function listAudit(context: TransportContext, input: {
|
|
3144
|
+
readonly bearer: string;
|
|
3145
|
+
readonly action?: string;
|
|
3146
|
+
readonly actorId?: string;
|
|
3147
|
+
readonly targetType?: string;
|
|
3148
|
+
readonly targetId?: string;
|
|
3149
|
+
readonly offset?: number;
|
|
3150
|
+
readonly limit?: number;
|
|
3151
|
+
}): Promise<AdminAuditListResponse>;
|
|
3152
|
+
//#endregion
|
|
3153
|
+
//#region src/catalog/app-page.d.ts
|
|
3154
|
+
declare function getAppPage(context: TransportContext, input: {
|
|
3155
|
+
readonly bearer?: string;
|
|
3156
|
+
readonly slug: string;
|
|
3157
|
+
}): Promise<PublicAppPage>;
|
|
3158
|
+
//#endregion
|
|
3159
|
+
//#region src/catalog/content-reports.d.ts
|
|
3160
|
+
declare function submitAppContentReport(context: TransportContext, input: {
|
|
3161
|
+
readonly appId: string;
|
|
3162
|
+
readonly bearer: string;
|
|
3163
|
+
readonly report: SubmitAppContentReportRequest;
|
|
3164
|
+
}): Promise<SubmitAppContentReportResponse>;
|
|
3165
|
+
//#endregion
|
|
3166
|
+
//#region src/catalog/library.d.ts
|
|
3167
|
+
declare function getLibrary(context: TransportContext, input: {
|
|
3168
|
+
readonly bearer?: string;
|
|
3169
|
+
readonly genre?: string;
|
|
3170
|
+
readonly q?: string;
|
|
3171
|
+
readonly before?: string;
|
|
3172
|
+
readonly limit?: number;
|
|
3173
|
+
}): Promise<LibraryListResponse>;
|
|
3174
|
+
//#endregion
|
|
3175
|
+
//#region src/catalog/reviews.d.ts
|
|
3176
|
+
declare function listGameReviews(context: TransportContext, input: {
|
|
3177
|
+
readonly slug: string;
|
|
3178
|
+
readonly bearer?: string;
|
|
3179
|
+
readonly sort?: ReviewSort;
|
|
3180
|
+
readonly limit?: number;
|
|
3181
|
+
readonly offset?: number;
|
|
3182
|
+
}): Promise<ReviewListResponse>;
|
|
3183
|
+
declare function listDeveloperAppReviews(context: TransportContext, input: {
|
|
3184
|
+
readonly appId: string;
|
|
3185
|
+
readonly bearer: string;
|
|
3186
|
+
readonly sort?: ReviewSort;
|
|
3187
|
+
readonly limit?: number;
|
|
3188
|
+
readonly offset?: number;
|
|
3189
|
+
}): Promise<ReviewListResponse>;
|
|
3190
|
+
declare function getMyGameReview(context: TransportContext, input: {
|
|
3191
|
+
readonly slug: string;
|
|
3192
|
+
readonly bearer: string;
|
|
3193
|
+
}): Promise<MyReviewResponse>;
|
|
3194
|
+
declare function upsertMyGameReview(context: TransportContext, input: {
|
|
3195
|
+
readonly slug: string;
|
|
3196
|
+
readonly bearer: string;
|
|
3197
|
+
readonly review: UpsertReviewRequest;
|
|
3198
|
+
}): Promise<MyReviewResponse>;
|
|
3199
|
+
declare function deleteMyGameReview(context: TransportContext, input: {
|
|
3200
|
+
readonly slug: string;
|
|
3201
|
+
readonly bearer: string;
|
|
3202
|
+
}): Promise<MyReviewResponse>;
|
|
3203
|
+
declare function getMyGameReviewReactions(context: TransportContext, input: {
|
|
3204
|
+
readonly slug: string;
|
|
3205
|
+
readonly bearer: string;
|
|
3206
|
+
}): Promise<MyReviewReactionsResponse>;
|
|
3207
|
+
declare function setMyGameReviewReaction(context: TransportContext, input: {
|
|
3208
|
+
readonly slug: string;
|
|
3209
|
+
readonly reviewId: string;
|
|
3210
|
+
readonly bearer: string;
|
|
3211
|
+
readonly reaction: SetReviewReactionRequest;
|
|
3212
|
+
}): Promise<SetReviewReactionResponse>;
|
|
3213
|
+
declare function tipGameReview(context: TransportContext, input: {
|
|
3214
|
+
readonly slug: string;
|
|
3215
|
+
readonly reviewId: string;
|
|
3216
|
+
readonly bearer: string;
|
|
3217
|
+
readonly tip: TipReviewRequest;
|
|
3218
|
+
readonly idempotencyKey?: string;
|
|
3219
|
+
}): Promise<TipReviewResponse>;
|
|
3220
|
+
declare function listGameReviewComments(context: TransportContext, input: {
|
|
3221
|
+
readonly slug: string;
|
|
3222
|
+
readonly reviewId: string;
|
|
3223
|
+
readonly bearer?: string;
|
|
3224
|
+
readonly limit?: number;
|
|
3225
|
+
readonly offset?: number;
|
|
3226
|
+
}): Promise<ReviewCommentListResponse>;
|
|
3227
|
+
declare function commentOnGameReview(context: TransportContext, input: {
|
|
3228
|
+
readonly slug: string;
|
|
3229
|
+
readonly reviewId: string;
|
|
3230
|
+
readonly bearer: string;
|
|
3231
|
+
readonly comment: CreateReviewCommentRequest;
|
|
3232
|
+
}): Promise<CreateReviewCommentResponse>;
|
|
3233
|
+
declare function deleteGameReviewComment(context: TransportContext, input: {
|
|
3234
|
+
readonly slug: string;
|
|
3235
|
+
readonly commentId: string;
|
|
3236
|
+
readonly bearer: string;
|
|
3237
|
+
}): Promise<DeleteReviewCommentResponse>;
|
|
3238
|
+
declare function replyToGameReview(context: TransportContext, input: {
|
|
3239
|
+
readonly appId: string;
|
|
3240
|
+
readonly reviewId: string;
|
|
3241
|
+
readonly bearer: string;
|
|
3242
|
+
readonly reply: UpsertReviewReplyRequest;
|
|
3243
|
+
}): Promise<ReviewReplyResponse>;
|
|
3244
|
+
declare function deleteGameReviewReply(context: TransportContext, input: {
|
|
3245
|
+
readonly appId: string;
|
|
3246
|
+
readonly reviewId: string;
|
|
3247
|
+
readonly bearer: string;
|
|
3248
|
+
}): Promise<ReviewReplyResponse>;
|
|
3249
|
+
//#endregion
|
|
3250
|
+
//#region src/core/errors.d.ts
|
|
3251
|
+
type OauthErrorCode = OauthErrorResponse["error"];
|
|
3252
|
+
declare class TronError extends Error {
|
|
3253
|
+
readonly status: number;
|
|
3254
|
+
readonly code: string;
|
|
3255
|
+
readonly body: string;
|
|
3256
|
+
constructor(status: number, code: string, message: string, body: string);
|
|
3257
|
+
}
|
|
3258
|
+
declare class TronOauthError extends TronError {
|
|
3259
|
+
readonly error: OauthErrorCode;
|
|
3260
|
+
readonly errorDescription?: string | undefined;
|
|
3261
|
+
readonly errorUri?: string | undefined;
|
|
3262
|
+
constructor(status: number, error: OauthErrorCode, body: string, errorDescription?: string, errorUri?: string);
|
|
3263
|
+
}
|
|
3264
|
+
declare const TRON_WS_CLOSE_CODES: {
|
|
3265
|
+
readonly BAD_REQUEST: 4400;
|
|
3266
|
+
readonly UNAUTHORIZED: 4401;
|
|
3267
|
+
readonly FORBIDDEN: 4403;
|
|
3268
|
+
readonly NOT_FOUND: 4404;
|
|
3269
|
+
readonly UNAVAILABLE: 4503;
|
|
3270
|
+
};
|
|
3271
|
+
type TronWsCloseCode = (typeof TRON_WS_CLOSE_CODES)[keyof typeof TRON_WS_CLOSE_CODES];
|
|
3272
|
+
declare class TronWsCloseError extends Error {
|
|
3273
|
+
readonly code: number;
|
|
3274
|
+
readonly reason: string;
|
|
3275
|
+
constructor(code: number, reason: string);
|
|
3276
|
+
get isApplicationError(): boolean;
|
|
3277
|
+
get isPermanent(): boolean;
|
|
3278
|
+
}
|
|
3279
|
+
//#endregion
|
|
3280
|
+
//#region src/core/https-guard.d.ts
|
|
3281
|
+
type HttpsGuardOptions = {
|
|
3282
|
+
readonly isProduction?: boolean;
|
|
3283
|
+
};
|
|
3284
|
+
declare function assertSecureIssuer(issuer: string, options?: HttpsGuardOptions): void;
|
|
3285
|
+
//#endregion
|
|
3286
|
+
//#region src/core/logger.d.ts
|
|
3287
|
+
declare function createNoopLogger(): Logger;
|
|
3288
|
+
declare function createConsoleLogger(prefix?: string): Logger;
|
|
3289
|
+
//#endregion
|
|
3290
|
+
//#region src/core/token-store.d.ts
|
|
3291
|
+
declare function createInMemoryTokenStore(): TokenStore;
|
|
3292
|
+
//#endregion
|
|
3293
|
+
//#region src/dashboard/activity.d.ts
|
|
3294
|
+
declare function getActivity(context: TransportContext, input: {
|
|
3295
|
+
readonly bearer: string;
|
|
3296
|
+
readonly kind?: string;
|
|
3297
|
+
readonly direction?: "outgoing" | "incoming";
|
|
3298
|
+
readonly sort?: "newest" | "oldest" | "value_desc" | "value_asc";
|
|
3299
|
+
readonly chain?: string;
|
|
3300
|
+
readonly limit?: number;
|
|
3301
|
+
readonly cursor?: string;
|
|
3302
|
+
readonly before?: string;
|
|
3303
|
+
readonly includeInactive?: boolean;
|
|
3304
|
+
}): Promise<ActivityResponse>;
|
|
3305
|
+
declare function getActivityGroup(context: TransportContext, input: {
|
|
3306
|
+
readonly bearer: string;
|
|
3307
|
+
readonly groupId: string;
|
|
3308
|
+
}): Promise<ActivityResponse>;
|
|
3309
|
+
//#endregion
|
|
3310
|
+
//#region src/dashboard/chains.d.ts
|
|
3311
|
+
declare function getPaymentChains(context: TransportContext, input: {
|
|
3312
|
+
readonly bearer: string;
|
|
3313
|
+
}): Promise<PaymentChainsResponse>;
|
|
3314
|
+
//#endregion
|
|
3315
|
+
//#region src/dashboard/outstanding.d.ts
|
|
3316
|
+
declare function getOutstanding(context: TransportContext, input: {
|
|
3317
|
+
readonly bearer: string;
|
|
3318
|
+
readonly chain?: string;
|
|
3319
|
+
}): Promise<OutstandingResponse>;
|
|
3320
|
+
//#endregion
|
|
3321
|
+
//#region src/dashboard/payment-history.d.ts
|
|
3322
|
+
declare function getPaymentHistory(context: TransportContext, input: {
|
|
3323
|
+
readonly bearer: string;
|
|
3324
|
+
readonly status?: "pending" | "completed" | "expired" | "all";
|
|
3325
|
+
readonly limit?: number;
|
|
3326
|
+
readonly before?: string;
|
|
3327
|
+
}): Promise<PaymentHistoryResponse>;
|
|
3328
|
+
//#endregion
|
|
3329
|
+
//#region src/developer/api-keys.d.ts
|
|
3330
|
+
declare function createDeveloperApiKey(context: TransportContext, input: {
|
|
3331
|
+
readonly bearer: string;
|
|
3332
|
+
readonly body: CreateDeveloperApiKey;
|
|
3333
|
+
}): Promise<CreateDeveloperApiKeyResponse>;
|
|
3334
|
+
declare function listDeveloperApiKeys(context: TransportContext, input: {
|
|
3335
|
+
readonly bearer: string;
|
|
3336
|
+
}): Promise<DeveloperApiKeysResponse>;
|
|
3337
|
+
declare function revokeDeveloperApiKey(context: TransportContext, input: {
|
|
3338
|
+
readonly bearer: string;
|
|
3339
|
+
readonly id: string;
|
|
3340
|
+
}): Promise<DeveloperOkResponse>;
|
|
3341
|
+
//#endregion
|
|
3342
|
+
//#region src/developer/apps.d.ts
|
|
3343
|
+
declare function createDeveloperApp(context: TransportContext, input: {
|
|
3344
|
+
readonly bearer: string;
|
|
3345
|
+
readonly body: CreateDeveloperApp;
|
|
3346
|
+
}): Promise<DeveloperAppIdResponse>;
|
|
3347
|
+
declare function updateDeveloperApp(context: TransportContext, input: {
|
|
3348
|
+
readonly bearer: string;
|
|
3349
|
+
readonly id: string;
|
|
3350
|
+
readonly body: UpdateDeveloperApp;
|
|
3351
|
+
}): Promise<DeveloperAppIdResponse>;
|
|
3352
|
+
declare function deleteDeveloperApp(context: TransportContext, input: {
|
|
3353
|
+
readonly bearer: string;
|
|
3354
|
+
readonly id: string;
|
|
3355
|
+
}): Promise<DeveloperAppIdResponse>;
|
|
3356
|
+
declare function uploadDeveloperAppLogo(context: TransportContext, input: {
|
|
3357
|
+
readonly bearer: string;
|
|
3358
|
+
readonly id: string;
|
|
3359
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3360
|
+
readonly filename: string;
|
|
3361
|
+
readonly contentType: string;
|
|
3362
|
+
}): Promise<DeveloperLogoUploadResponse>;
|
|
3363
|
+
declare function deleteDeveloperAppLogo(context: TransportContext, input: {
|
|
3364
|
+
readonly bearer: string;
|
|
3365
|
+
readonly id: string;
|
|
3366
|
+
}): Promise<DeveloperLogoUploadResponse>;
|
|
3367
|
+
declare function getDeveloperAppBalances(context: TransportContext, input: {
|
|
3368
|
+
readonly bearer: string;
|
|
3369
|
+
readonly id: string;
|
|
3370
|
+
}): Promise<DeveloperAppBalancesResponse>;
|
|
3371
|
+
declare function getDeveloperAppTronBalance(context: TransportContext, input: {
|
|
3372
|
+
readonly bearer: string;
|
|
3373
|
+
readonly id: string;
|
|
3374
|
+
}): Promise<DeveloperAppTronBalanceResponse>;
|
|
3375
|
+
declare function getDeveloperAppActivity(context: TransportContext, input: {
|
|
3376
|
+
readonly bearer: string;
|
|
3377
|
+
readonly id: string;
|
|
3378
|
+
readonly kind?: string;
|
|
3379
|
+
readonly direction?: "outgoing" | "incoming";
|
|
3380
|
+
readonly sort?: "newest" | "oldest" | "value_desc" | "value_asc";
|
|
3381
|
+
readonly chain?: string;
|
|
3382
|
+
readonly limit?: number;
|
|
3383
|
+
readonly cursor?: string;
|
|
3384
|
+
readonly before?: string;
|
|
3385
|
+
}): Promise<ActivityResponse>;
|
|
3386
|
+
declare function getDeveloperAppEarnings(context: TransportContext, input: {
|
|
3387
|
+
readonly bearer: string;
|
|
3388
|
+
readonly id: string;
|
|
3389
|
+
readonly range?: string;
|
|
3390
|
+
readonly chain?: string;
|
|
3391
|
+
}): Promise<DeveloperAppEarningsResponse>;
|
|
3392
|
+
declare function getDeveloperAppPlaytime(context: TransportContext, input: {
|
|
3393
|
+
readonly bearer: string;
|
|
3394
|
+
readonly id: string;
|
|
3395
|
+
readonly range?: string;
|
|
3396
|
+
}): Promise<DeveloperAppPlaytimeResponse>;
|
|
3397
|
+
declare function getDeveloperAppOverview(context: TransportContext, input: {
|
|
3398
|
+
readonly bearer: string;
|
|
3399
|
+
readonly id: string;
|
|
3400
|
+
}): Promise<DeveloperAppOverviewResponse>;
|
|
3401
|
+
declare function getDeveloperAppWallets(context: TransportContext, input: {
|
|
3402
|
+
readonly bearer: string;
|
|
3403
|
+
readonly id: string;
|
|
3404
|
+
}): Promise<DeveloperAppWalletsResponse>;
|
|
3405
|
+
declare function updateDeveloperAppAutoSweep(context: TransportContext, input: {
|
|
3406
|
+
readonly bearer: string;
|
|
3407
|
+
readonly id: string;
|
|
3408
|
+
readonly chain: string;
|
|
3409
|
+
readonly body: DeveloperAppAutoSweepRequest;
|
|
3410
|
+
}): Promise<DeveloperAppAutoSweepResponse>;
|
|
3411
|
+
declare function provisionDeveloperAppWallet(context: TransportContext, input: {
|
|
3412
|
+
readonly bearer: string;
|
|
3413
|
+
readonly id: string;
|
|
3414
|
+
readonly chain: string;
|
|
3415
|
+
}): Promise<DeveloperAppProvisionWalletResponse>;
|
|
3416
|
+
declare function withdrawDeveloperAppWallet(context: TransportContext, input: {
|
|
3417
|
+
readonly bearer: string;
|
|
3418
|
+
readonly id: string;
|
|
3419
|
+
readonly chain: string;
|
|
3420
|
+
readonly token?: string;
|
|
3421
|
+
}): Promise<DeveloperAppWithdrawResponse>;
|
|
3422
|
+
declare function consolidateDeveloperAppWallet(context: TransportContext, input: {
|
|
3423
|
+
readonly bearer: string;
|
|
3424
|
+
readonly id: string;
|
|
3425
|
+
readonly chain: string;
|
|
3426
|
+
}): Promise<DeveloperAppConsolidateResponse>;
|
|
3427
|
+
declare function rotateDeveloperAppKey(context: TransportContext, input: {
|
|
3428
|
+
readonly bearer: string;
|
|
3429
|
+
readonly id: string;
|
|
3430
|
+
readonly env: "development" | "production";
|
|
3431
|
+
}): Promise<RegenerateDeveloperAppKeyResponse>;
|
|
3432
|
+
declare function requestDeveloperAppProduction(context: TransportContext, input: {
|
|
3433
|
+
readonly bearer: string;
|
|
3434
|
+
readonly id: string;
|
|
3435
|
+
readonly body: CreateDeveloperProductionRequest;
|
|
3436
|
+
}): Promise<CreateDeveloperProductionRequestResponse>;
|
|
3437
|
+
declare function rotateDeveloperAppPaymentWebhookSecret(context: TransportContext, input: {
|
|
3438
|
+
readonly bearer: string;
|
|
3439
|
+
readonly id: string;
|
|
3440
|
+
}): Promise<RegenerateDeveloperAppWebhookSecretResponse>;
|
|
3441
|
+
declare function getDeveloperPaymentAppeals(context: TransportContext, input: {
|
|
3442
|
+
readonly bearer: string;
|
|
3443
|
+
readonly chain?: string;
|
|
3444
|
+
}): Promise<DevAppealsResponse>;
|
|
3445
|
+
declare function getDeveloperPaymentPendingDeposits(context: TransportContext, input: {
|
|
3446
|
+
readonly bearer: string;
|
|
3447
|
+
readonly chain?: string;
|
|
3448
|
+
}): Promise<DevPendingDepositsResponse>;
|
|
3449
|
+
declare function getDeveloperTronBalanceSummary(context: TransportContext, input: {
|
|
3450
|
+
readonly bearer: string;
|
|
3451
|
+
}): Promise<DeveloperTronBalanceSummaryResponse>;
|
|
3452
|
+
declare function listDeveloperAppContentReports(context: TransportContext, input: {
|
|
3453
|
+
readonly bearer: string;
|
|
3454
|
+
readonly id: string;
|
|
3455
|
+
readonly status?: AppContentReportStatus;
|
|
3456
|
+
readonly limit?: number;
|
|
3457
|
+
readonly offset?: number;
|
|
3458
|
+
}): Promise<AppContentReportListResponse>;
|
|
3459
|
+
declare function updateDeveloperAppContentReportStatus(context: TransportContext, input: {
|
|
3460
|
+
readonly bearer: string;
|
|
3461
|
+
readonly id: string;
|
|
3462
|
+
readonly reportId: string;
|
|
3463
|
+
readonly status: "acknowledged" | "dismissed";
|
|
3464
|
+
}): Promise<AppContentReport>;
|
|
3465
|
+
//#endregion
|
|
3466
|
+
//#region src/developer/inventory.d.ts
|
|
3467
|
+
declare function quoteDeveloperAppInventoryRegistration(context: TransportContext, input: {
|
|
3468
|
+
readonly bearer: string;
|
|
3469
|
+
readonly appId: string;
|
|
3470
|
+
readonly registration: InventoryItemRegistrationInput;
|
|
3471
|
+
}): Promise<InventoryRegistrationQuote>;
|
|
3472
|
+
declare function registerDeveloperAppInventoryItem(context: TransportContext, input: {
|
|
3473
|
+
readonly bearer: string;
|
|
3474
|
+
readonly appId: string;
|
|
3475
|
+
readonly registration: InventoryItemRegistrationInput;
|
|
3476
|
+
}): Promise<InventoryItemRegistrationResult>;
|
|
3477
|
+
declare function listDeveloperAppInventoryCollections(context: TransportContext, input: {
|
|
3478
|
+
readonly bearer: string;
|
|
3479
|
+
readonly appId: string;
|
|
3480
|
+
}): Promise<InventoryCollectionListResponse>;
|
|
3481
|
+
declare function listDeveloperAppInventoryItems(context: TransportContext, input: {
|
|
3482
|
+
readonly bearer: string;
|
|
3483
|
+
readonly appId: string;
|
|
3484
|
+
}): Promise<InventoryItemListResponse>;
|
|
3485
|
+
declare function createDeveloperAppMintPermit(context: TransportContext, input: {
|
|
3486
|
+
readonly bearer: string;
|
|
3487
|
+
readonly appId: string;
|
|
3488
|
+
readonly itemId: string;
|
|
3489
|
+
readonly grant: InventoryMintPermitCreateInput;
|
|
3490
|
+
}): Promise<InventoryMintPermitRecord>;
|
|
3491
|
+
declare function getDeveloperAppInventoryItemHolders(context: TransportContext, input: {
|
|
3492
|
+
readonly bearer: string;
|
|
3493
|
+
readonly appId: string;
|
|
3494
|
+
readonly itemId: string;
|
|
3495
|
+
}): Promise<InventoryItemHoldersResponse>;
|
|
3496
|
+
declare function uploadDeveloperAppInventoryItemImage(context: TransportContext, input: {
|
|
3497
|
+
readonly bearer: string;
|
|
3498
|
+
readonly appId: string;
|
|
3499
|
+
readonly itemId: string;
|
|
3500
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3501
|
+
readonly filename: string;
|
|
3502
|
+
readonly contentType: string;
|
|
3503
|
+
}): Promise<InventoryItemRecord>;
|
|
3504
|
+
declare function uploadDeveloperAppInventoryItemBanner(context: TransportContext, input: {
|
|
3505
|
+
readonly bearer: string;
|
|
3506
|
+
readonly appId: string;
|
|
3507
|
+
readonly itemId: string;
|
|
3508
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3509
|
+
readonly filename: string;
|
|
3510
|
+
readonly contentType: string;
|
|
3511
|
+
}): Promise<InventoryItemRecord>;
|
|
3512
|
+
//#endregion
|
|
3513
|
+
//#region src/developer/pages.d.ts
|
|
3514
|
+
declare function getDeveloperAppPage(context: TransportContext, input: {
|
|
3515
|
+
readonly bearer: string;
|
|
3516
|
+
readonly appId: string;
|
|
3517
|
+
}): Promise<AppPageDraft>;
|
|
3518
|
+
declare function updateAppPage(context: TransportContext, input: {
|
|
3519
|
+
readonly bearer: string;
|
|
3520
|
+
readonly appId: string;
|
|
3521
|
+
readonly body: UpdateAppPage;
|
|
3522
|
+
}): Promise<AppPageDraft>;
|
|
3523
|
+
declare function uploadAppPageBanner(context: TransportContext, input: {
|
|
3524
|
+
readonly bearer: string;
|
|
3525
|
+
readonly appId: string;
|
|
3526
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3527
|
+
readonly filename: string;
|
|
3528
|
+
readonly contentType: string;
|
|
3529
|
+
}): Promise<PostMeDeveloperAppsByAppIdPageBannerResponse>;
|
|
3530
|
+
declare function deleteAppPageBanner(context: TransportContext, input: {
|
|
3531
|
+
readonly bearer: string;
|
|
3532
|
+
readonly appId: string;
|
|
3533
|
+
}): Promise<void>;
|
|
3534
|
+
declare function uploadAppPageThumbnail(context: TransportContext, input: {
|
|
3535
|
+
readonly bearer: string;
|
|
3536
|
+
readonly appId: string;
|
|
3537
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3538
|
+
readonly filename: string;
|
|
3539
|
+
readonly contentType: string;
|
|
3540
|
+
}): Promise<PostMeDeveloperAppsByAppIdPageThumbnailResponse>;
|
|
3541
|
+
declare function deleteAppPageThumbnail(context: TransportContext, input: {
|
|
3542
|
+
readonly bearer: string;
|
|
3543
|
+
readonly appId: string;
|
|
3544
|
+
}): Promise<void>;
|
|
3545
|
+
declare function uploadAppPageThumbnailVideo(context: TransportContext, input: {
|
|
3546
|
+
readonly bearer: string;
|
|
3547
|
+
readonly appId: string;
|
|
3548
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3549
|
+
readonly filename: string;
|
|
3550
|
+
readonly contentType: string;
|
|
3551
|
+
}): Promise<PostMeDeveloperAppsByAppIdPageThumbnailVideoResponse>;
|
|
3552
|
+
declare function deleteAppPageThumbnailVideo(context: TransportContext, input: {
|
|
3553
|
+
readonly bearer: string;
|
|
3554
|
+
readonly appId: string;
|
|
3555
|
+
}): Promise<void>;
|
|
3556
|
+
declare function uploadAppPageGallery(context: TransportContext, input: {
|
|
3557
|
+
readonly bearer: string;
|
|
3558
|
+
readonly appId: string;
|
|
3559
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3560
|
+
readonly filename: string;
|
|
3561
|
+
readonly contentType: string;
|
|
3562
|
+
}): Promise<AppPageGalleryUploadResponse>;
|
|
3563
|
+
declare function submitAppPageForReview(context: TransportContext, input: {
|
|
3564
|
+
readonly bearer: string;
|
|
3565
|
+
readonly appId: string;
|
|
3566
|
+
}): Promise<AppPageDraft>;
|
|
3567
|
+
declare function unpublishAppPage(context: TransportContext, input: {
|
|
3568
|
+
readonly bearer: string;
|
|
3569
|
+
readonly appId: string;
|
|
3570
|
+
}): Promise<AppPageDraft>;
|
|
3571
|
+
//#endregion
|
|
3572
|
+
//#region src/developer/participants.d.ts
|
|
3573
|
+
declare function listDeveloperAppParticipants(context: TransportContext, input: {
|
|
3574
|
+
readonly bearer: string;
|
|
3575
|
+
readonly id: string;
|
|
3576
|
+
}): Promise<DeveloperAppParticipantsResponse>;
|
|
3577
|
+
declare function inviteDeveloperAppParticipant(context: TransportContext, input: {
|
|
3578
|
+
readonly bearer: string;
|
|
3579
|
+
readonly id: string;
|
|
3580
|
+
readonly body: InviteDeveloperAppParticipant;
|
|
3581
|
+
}): Promise<DeveloperAppParticipantsResponse>;
|
|
3582
|
+
declare function revokeDeveloperAppParticipant(context: TransportContext, input: {
|
|
3583
|
+
readonly bearer: string;
|
|
3584
|
+
readonly id: string;
|
|
3585
|
+
readonly userId: string;
|
|
3586
|
+
}): Promise<DeveloperOkResponse>;
|
|
3587
|
+
declare function listDeveloperInvites(context: TransportContext, input: {
|
|
3588
|
+
readonly bearer: string;
|
|
3589
|
+
}): Promise<DeveloperInvitesResponse>;
|
|
3590
|
+
declare function acceptDeveloperInvite(context: TransportContext, input: {
|
|
3591
|
+
readonly bearer: string;
|
|
3592
|
+
readonly appId: string;
|
|
3593
|
+
}): Promise<DeveloperOkResponse>;
|
|
3594
|
+
declare function declineDeveloperInvite(context: TransportContext, input: {
|
|
3595
|
+
readonly bearer: string;
|
|
3596
|
+
readonly appId: string;
|
|
3597
|
+
}): Promise<DeveloperOkResponse>;
|
|
3598
|
+
//#endregion
|
|
3599
|
+
//#region src/developer/profile.d.ts
|
|
3600
|
+
declare function getDeveloperStatus(context: TransportContext, input: {
|
|
3601
|
+
readonly bearer: string;
|
|
3602
|
+
}): Promise<DeveloperMeStatus>;
|
|
3603
|
+
declare function updateDeveloperProfile(context: TransportContext, input: {
|
|
3604
|
+
readonly bearer: string;
|
|
3605
|
+
readonly body: UpdateDeveloperProfile;
|
|
3606
|
+
}): Promise<DeveloperOkResponse>;
|
|
3607
|
+
declare function uploadDeveloperProfileLogo(context: TransportContext, input: {
|
|
3608
|
+
readonly bearer: string;
|
|
3609
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3610
|
+
readonly filename: string;
|
|
3611
|
+
readonly contentType: string;
|
|
3612
|
+
}): Promise<DeveloperLogoUploadResponse>;
|
|
3613
|
+
declare function deleteDeveloperProfileLogo(context: TransportContext, input: {
|
|
3614
|
+
readonly bearer: string;
|
|
3615
|
+
}): Promise<DeveloperLogoUploadResponse>;
|
|
3616
|
+
declare function submitDeveloperRequest(context: TransportContext, input: {
|
|
3617
|
+
readonly bearer: string;
|
|
3618
|
+
readonly body: CreateDeveloperRoleRequest;
|
|
3619
|
+
}): Promise<DeveloperOkResponse>;
|
|
3620
|
+
declare function uploadDeveloperRequestLogo(context: TransportContext, input: {
|
|
3621
|
+
readonly bearer: string;
|
|
3622
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3623
|
+
readonly filename: string;
|
|
3624
|
+
readonly contentType: string;
|
|
3625
|
+
}): Promise<DeveloperLogoUploadResponse>;
|
|
3626
|
+
declare function deleteDeveloperRequestLogo(context: TransportContext, input: {
|
|
3627
|
+
readonly bearer: string;
|
|
3628
|
+
}): Promise<DeveloperLogoUploadResponse>;
|
|
3629
|
+
declare function uploadMultipart(context: TransportContext, input: {
|
|
3630
|
+
readonly path: string;
|
|
3631
|
+
readonly bearer: string;
|
|
3632
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3633
|
+
readonly filename: string;
|
|
3634
|
+
readonly contentType: string;
|
|
3635
|
+
}): Promise<unknown>;
|
|
3636
|
+
//#endregion
|
|
3637
|
+
//#region src/developer/vault.d.ts
|
|
3638
|
+
declare function createDeveloperVaultPermit(context: TransportContext, input: {
|
|
3639
|
+
readonly bearer: string;
|
|
3640
|
+
readonly appId: string;
|
|
3641
|
+
readonly itemId: string;
|
|
3642
|
+
readonly grant: InventoryVaultPermitCreateInput;
|
|
3643
|
+
}): Promise<InventoryVaultPermitRecord>;
|
|
3644
|
+
declare function createDeveloperWithdrawPermit(context: TransportContext, input: {
|
|
3645
|
+
readonly bearer: string;
|
|
3646
|
+
readonly appId: string;
|
|
3647
|
+
readonly itemId: string;
|
|
3648
|
+
readonly grant: InventoryWithdrawPermitCreateInput;
|
|
3649
|
+
}): Promise<InventoryVaultPermitRecord>;
|
|
3650
|
+
//#endregion
|
|
3651
|
+
//#region src/events/inventory-socket.d.ts
|
|
3652
|
+
declare const inventoryUpdateEventSchema: z.ZodObject<{
|
|
3653
|
+
event: z.ZodLiteral<"inventory.updated">;
|
|
3654
|
+
deliveredAt: z.ZodString;
|
|
3655
|
+
environment: z.ZodEnum<{
|
|
3656
|
+
development: "development";
|
|
3657
|
+
production: "production";
|
|
3658
|
+
}>;
|
|
3659
|
+
subject: z.ZodString;
|
|
3660
|
+
collectionId: z.ZodString;
|
|
3661
|
+
collectionAddress: z.ZodString;
|
|
3662
|
+
chain: z.ZodString;
|
|
3663
|
+
kind: z.ZodEnum<{
|
|
3664
|
+
erc721: "erc721";
|
|
3665
|
+
erc1155: "erc1155";
|
|
3666
|
+
}>;
|
|
3667
|
+
tokenId: z.ZodString;
|
|
3668
|
+
direction: z.ZodEnum<{
|
|
3669
|
+
credit: "credit";
|
|
3670
|
+
debit: "debit";
|
|
3671
|
+
}>;
|
|
3672
|
+
amount: z.ZodString;
|
|
3673
|
+
balance: z.ZodString;
|
|
3674
|
+
}, z.core.$strip>;
|
|
3675
|
+
type InventoryUpdateEvent = z.infer<typeof inventoryUpdateEventSchema>;
|
|
3676
|
+
type OauthInventoryEventsSubscriberLifecycle = {
|
|
3677
|
+
onOpen?: () => void;
|
|
3678
|
+
onSubscribed?: (appId: string) => void;
|
|
3679
|
+
onMessage: (body: InventoryUpdateEvent) => void | Promise<void>;
|
|
3680
|
+
onClose?: (error: TronWsCloseError) => void;
|
|
3681
|
+
onError?: (error: Error) => void;
|
|
3682
|
+
};
|
|
3683
|
+
type OauthInventoryEventsSubscriberOptions = {
|
|
3684
|
+
readonly issuer: string;
|
|
3685
|
+
readonly clientId: string;
|
|
3686
|
+
readonly clientSecret: string;
|
|
3687
|
+
readonly logger?: Logger;
|
|
3688
|
+
readonly lifecycle: OauthInventoryEventsSubscriberLifecycle;
|
|
3689
|
+
readonly initialBackoffMs?: number;
|
|
3690
|
+
readonly maxBackoffMs?: number;
|
|
3691
|
+
readonly shouldReconnect?: (error: TronWsCloseError) => boolean;
|
|
3692
|
+
readonly WebSocketImpl?: typeof globalThis.WebSocket;
|
|
3693
|
+
};
|
|
3694
|
+
type OauthInventoryEventsSubscriber = {
|
|
3695
|
+
readonly stop: () => void;
|
|
3696
|
+
};
|
|
3697
|
+
declare function startOauthInventoryEventsSubscriber(options: OauthInventoryEventsSubscriberOptions): OauthInventoryEventsSubscriber;
|
|
3698
|
+
//#endregion
|
|
3699
|
+
//#region src/webhook/verify.d.ts
|
|
3700
|
+
declare const oauthPaymentWebhookBodySchema: z.ZodObject<{
|
|
3701
|
+
event: z.ZodEnum<{
|
|
3702
|
+
"intent.completed": "intent.completed";
|
|
3703
|
+
"intent.denied": "intent.denied";
|
|
3704
|
+
"intent.expired": "intent.expired";
|
|
3705
|
+
"intent.txhash_indexed": "intent.txhash_indexed";
|
|
3706
|
+
}>;
|
|
3707
|
+
deliveredAt: z.ZodISODateTime;
|
|
3708
|
+
intent: z.ZodObject<{
|
|
3709
|
+
intentId: z.ZodString;
|
|
3710
|
+
appId: z.ZodString;
|
|
3711
|
+
status: z.ZodEnum<{
|
|
3712
|
+
completed: "completed";
|
|
3713
|
+
pending: "pending";
|
|
3714
|
+
awaiting_funding: "awaiting_funding";
|
|
3715
|
+
denied: "denied";
|
|
3716
|
+
expired: "expired";
|
|
3717
|
+
}>;
|
|
3718
|
+
paymentId: z.ZodNullable<z.ZodString>;
|
|
3719
|
+
txHash: z.ZodNullable<z.ZodString>;
|
|
3720
|
+
usdCents: z.ZodInt;
|
|
3721
|
+
chain: z.ZodString;
|
|
3722
|
+
token: z.ZodNullable<z.ZodString>;
|
|
3723
|
+
grossAmount: z.ZodNullable<z.ZodString>;
|
|
3724
|
+
creditedAmount: z.ZodNullable<z.ZodString>;
|
|
3725
|
+
settlement: z.ZodNullable<z.ZodEnum<{
|
|
3726
|
+
instant: "instant";
|
|
3727
|
+
locked: "locked";
|
|
3728
|
+
}>>;
|
|
3729
|
+
resolvedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
3730
|
+
expiresAt: z.ZodISODateTime;
|
|
3731
|
+
}, z.core.$strip>;
|
|
3732
|
+
}, z.core.$strip>;
|
|
3733
|
+
type OauthPaymentWebhookBody = z.infer<typeof oauthPaymentWebhookBodySchema>;
|
|
3734
|
+
type VerifyWebhookInput = {
|
|
3735
|
+
readonly secret: string;
|
|
3736
|
+
readonly rawBody: string;
|
|
3737
|
+
readonly signatureHeader: string | null | undefined;
|
|
3738
|
+
readonly timestampHeader: string | null | undefined;
|
|
3739
|
+
readonly toleranceSeconds?: number | undefined;
|
|
3740
|
+
readonly now?: number | undefined;
|
|
3741
|
+
};
|
|
3742
|
+
type VerifyWebhookSuccess = {
|
|
3743
|
+
readonly ok: true;
|
|
3744
|
+
readonly body: OauthPaymentWebhookBody;
|
|
3745
|
+
};
|
|
3746
|
+
type VerifyWebhookFailure = {
|
|
3747
|
+
readonly ok: false;
|
|
3748
|
+
readonly reason: "missing_signature" | "missing_timestamp" | "invalid_timestamp" | "stale_timestamp" | "signature_mismatch" | "schema_mismatch";
|
|
3749
|
+
};
|
|
3750
|
+
type VerifyWebhookResult = VerifyWebhookSuccess | VerifyWebhookFailure;
|
|
3751
|
+
declare function verifyWebhook(input: VerifyWebhookInput): Promise<VerifyWebhookResult>;
|
|
3752
|
+
declare const WEBHOOK_SIGNATURE_HEADER = "x-metatron-signature";
|
|
3753
|
+
declare const WEBHOOK_TIMESTAMP_HEADER = "x-metatron-timestamp";
|
|
3754
|
+
//#endregion
|
|
3755
|
+
//#region src/events/socket.d.ts
|
|
3756
|
+
type OauthPaymentEventsSubscriberLifecycle = {
|
|
3757
|
+
onOpen?: () => void;
|
|
3758
|
+
onSubscribed?: (appId: string) => void;
|
|
3759
|
+
onMessage: (body: OauthPaymentWebhookBody) => void | Promise<void>;
|
|
3760
|
+
onClose?: (error: TronWsCloseError) => void;
|
|
3761
|
+
onError?: (error: Error) => void;
|
|
3762
|
+
};
|
|
3763
|
+
type OauthPaymentEventsSubscriberOptions = {
|
|
3764
|
+
readonly issuer: string;
|
|
3765
|
+
readonly clientId: string;
|
|
3766
|
+
readonly clientSecret: string;
|
|
3767
|
+
readonly logger?: Logger;
|
|
3768
|
+
readonly lifecycle: OauthPaymentEventsSubscriberLifecycle;
|
|
3769
|
+
readonly initialBackoffMs?: number;
|
|
3770
|
+
readonly maxBackoffMs?: number;
|
|
3771
|
+
readonly shouldReconnect?: (error: TronWsCloseError) => boolean;
|
|
3772
|
+
readonly WebSocketImpl?: typeof globalThis.WebSocket;
|
|
3773
|
+
readonly disableEventAck?: boolean;
|
|
3774
|
+
};
|
|
3775
|
+
type OauthPaymentEventsSubscriber = {
|
|
3776
|
+
readonly stop: () => void;
|
|
3777
|
+
};
|
|
3778
|
+
declare function startOauthPaymentEventsSubscriber(options: OauthPaymentEventsSubscriberOptions): OauthPaymentEventsSubscriber;
|
|
3779
|
+
//#endregion
|
|
3780
|
+
//#region src/inventory/list.d.ts
|
|
3781
|
+
declare function listInventory(context: TransportContext, input: {
|
|
3782
|
+
readonly bearer: string;
|
|
3783
|
+
}): Promise<InventoryListResponse>;
|
|
3784
|
+
declare function listInventoryForApp(context: TransportContext, input: {
|
|
3785
|
+
readonly bearer: string;
|
|
3786
|
+
}): Promise<InventoryListResponse>;
|
|
3787
|
+
//#endregion
|
|
3788
|
+
//#region src/inventory/nft-transfer.d.ts
|
|
3789
|
+
declare function quoteNftTransfer(context: TransportContext, input: {
|
|
3790
|
+
readonly bearer: string;
|
|
3791
|
+
readonly body: InventoryNftTransferQuoteRequest;
|
|
3792
|
+
}): Promise<InventoryNftTransferQuoteResponse>;
|
|
3793
|
+
declare function executeNftTransfer(context: TransportContext, input: {
|
|
3794
|
+
readonly bearer: string;
|
|
3795
|
+
readonly body: InventoryNftTransferRequest;
|
|
3796
|
+
}): Promise<InventoryNftTransferResponse>;
|
|
3797
|
+
//#endregion
|
|
3798
|
+
//#region src/inventory/permits.d.ts
|
|
3799
|
+
declare function listInventoryMintPermits(context: TransportContext, input: {
|
|
3800
|
+
readonly bearer: string;
|
|
3801
|
+
}): Promise<InventoryPendingPermitListResponse>;
|
|
3802
|
+
declare function redeemInventoryMintPermit(context: TransportContext, input: {
|
|
3803
|
+
readonly bearer: string;
|
|
3804
|
+
readonly permitId: string;
|
|
3805
|
+
}): Promise<InventoryPermitRedeemResult>;
|
|
3806
|
+
//#endregion
|
|
3807
|
+
//#region src/inventory/request-mint.d.ts
|
|
3808
|
+
declare function requestMint(context: TransportContext, input: {
|
|
3809
|
+
readonly appBearer: string;
|
|
3810
|
+
readonly body: MintRequestInput;
|
|
3811
|
+
}): Promise<MintRequestResult>;
|
|
3812
|
+
//#endregion
|
|
3813
|
+
//#region src/inventory/vault.d.ts
|
|
3814
|
+
declare function listInventoryVaultPermits(context: TransportContext, input: {
|
|
3815
|
+
readonly bearer: string;
|
|
3816
|
+
}): Promise<InventoryPendingVaultPermitListResponse>;
|
|
3817
|
+
declare function signInventoryVaultPermit(context: TransportContext, input: {
|
|
3818
|
+
readonly bearer: string;
|
|
3819
|
+
readonly permitId: string;
|
|
3820
|
+
}): Promise<InventorySignedVaultPermit>;
|
|
3821
|
+
declare function quoteRelayedVaultPermit(context: TransportContext, input: {
|
|
3822
|
+
readonly bearer: string;
|
|
3823
|
+
readonly permitId: string;
|
|
3824
|
+
}): Promise<InventoryRelayedVaultQuoteResponse>;
|
|
3825
|
+
declare function submitRelayedVaultPermit(context: TransportContext, input: {
|
|
3826
|
+
readonly bearer: string;
|
|
3827
|
+
readonly permitId: string;
|
|
3828
|
+
readonly body: InventoryRelayedVaultSubmitRequest;
|
|
3829
|
+
}): Promise<InventoryRelayedVaultSubmitResponse>;
|
|
3830
|
+
declare function listInventoryVaulted(context: TransportContext, input: {
|
|
3831
|
+
readonly bearer: string;
|
|
3832
|
+
}): Promise<InventoryVaultCustodyListResponse>;
|
|
3833
|
+
declare function listOauthInventoryVaulted(context: TransportContext, input: {
|
|
3834
|
+
readonly bearer: string;
|
|
3835
|
+
}): Promise<InventoryVaultCustodyListResponse>;
|
|
3836
|
+
//#endregion
|
|
3837
|
+
//#region src/messaging/dm-key-backup.d.ts
|
|
3838
|
+
declare function getDmKeyBackupStatus(context: TransportContext, input: {
|
|
3839
|
+
readonly bearer: string;
|
|
3840
|
+
}): Promise<DmKeyBackupStatusResponse>;
|
|
3841
|
+
declare function setupDmKeyBackup(context: TransportContext, input: {
|
|
3842
|
+
readonly bearer: string;
|
|
3843
|
+
readonly body: DmKeyBackupSetupBody;
|
|
3844
|
+
}): Promise<DmKeyBackupOkResponse>;
|
|
3845
|
+
declare function unlockDmKeyBackup(context: TransportContext, input: {
|
|
3846
|
+
readonly bearer: string;
|
|
3847
|
+
readonly body: DmKeyBackupUnlockBody;
|
|
3848
|
+
}): Promise<DmKeyBackupUnlockResponse>;
|
|
3849
|
+
//#endregion
|
|
3850
|
+
//#region src/messaging/dm-keys.d.ts
|
|
3851
|
+
declare function publishDmKey(context: TransportContext, input: {
|
|
3852
|
+
readonly bearer: string;
|
|
3853
|
+
readonly body: PublishDmKeyBody;
|
|
3854
|
+
}): Promise<DmKeyResponse>;
|
|
3855
|
+
declare function getMyDmKey(context: TransportContext, input: {
|
|
3856
|
+
readonly bearer: string;
|
|
3857
|
+
}): Promise<DmKeyResponse | null>;
|
|
3858
|
+
declare function getThreadDmKey(context: TransportContext, input: {
|
|
3859
|
+
readonly bearer: string;
|
|
3860
|
+
readonly threadId: string;
|
|
3861
|
+
}): Promise<DmKeyResponse>;
|
|
3862
|
+
declare function batchThreadDmKeys(context: TransportContext, input: {
|
|
3863
|
+
readonly bearer: string;
|
|
3864
|
+
readonly threadIds: readonly string[];
|
|
3865
|
+
}): Promise<BatchThreadDmKeysResponse>;
|
|
3866
|
+
//#endregion
|
|
3867
|
+
//#region src/messaging/logo.d.ts
|
|
3868
|
+
declare function uploadThreadLogo(context: TransportContext, input: {
|
|
3869
|
+
readonly bearer: string;
|
|
3870
|
+
readonly threadId: string;
|
|
3871
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
3872
|
+
readonly filename: string;
|
|
3873
|
+
readonly contentType: string;
|
|
3874
|
+
}): Promise<GroupThreadMutationResponse>;
|
|
3875
|
+
declare function deleteThreadLogo(context: TransportContext, input: {
|
|
3876
|
+
readonly bearer: string;
|
|
3877
|
+
readonly threadId: string;
|
|
3878
|
+
}): Promise<GroupThreadMutationResponse>;
|
|
3879
|
+
//#endregion
|
|
3880
|
+
//#region src/messaging/messages.d.ts
|
|
3881
|
+
declare function deleteMessage(context: TransportContext, input: {
|
|
3882
|
+
readonly bearer: string;
|
|
3883
|
+
readonly threadId: string;
|
|
3884
|
+
readonly messageId: string;
|
|
3885
|
+
}): Promise<MessagingOkResponse>;
|
|
3886
|
+
declare function editMessage(context: TransportContext, input: {
|
|
3887
|
+
readonly bearer: string;
|
|
3888
|
+
readonly threadId: string;
|
|
3889
|
+
readonly messageId: string;
|
|
3890
|
+
readonly body: EditMessageBody;
|
|
3891
|
+
}): Promise<MessageItem>;
|
|
3892
|
+
declare function addReaction(context: TransportContext, input: {
|
|
3893
|
+
readonly bearer: string;
|
|
3894
|
+
readonly threadId: string;
|
|
3895
|
+
readonly messageId: string;
|
|
3896
|
+
readonly emoji: ReactionEmoji;
|
|
3897
|
+
}): Promise<ReactionMutationResponse>;
|
|
3898
|
+
declare function removeReaction(context: TransportContext, input: {
|
|
3899
|
+
readonly bearer: string;
|
|
3900
|
+
readonly threadId: string;
|
|
3901
|
+
readonly messageId: string;
|
|
3902
|
+
readonly emoji: ReactionEmoji;
|
|
3903
|
+
}): Promise<ReactionMutationResponse>;
|
|
3904
|
+
//#endregion
|
|
3905
|
+
//#region src/messaging/participants.d.ts
|
|
3906
|
+
declare function removeParticipant(context: TransportContext, input: {
|
|
3907
|
+
readonly bearer: string;
|
|
3908
|
+
readonly threadId: string;
|
|
3909
|
+
readonly userId: string;
|
|
3910
|
+
}): Promise<GroupThreadMutationResponse>;
|
|
3911
|
+
declare function updateParticipantRole(context: TransportContext, input: {
|
|
3912
|
+
readonly bearer: string;
|
|
3913
|
+
readonly threadId: string;
|
|
3914
|
+
readonly userId: string;
|
|
3915
|
+
readonly body: UpdateParticipantRoleBody;
|
|
3916
|
+
}): Promise<GroupThreadMutationResponse>;
|
|
3917
|
+
//#endregion
|
|
3918
|
+
//#region src/messaging/threads.d.ts
|
|
3919
|
+
declare function deleteThread(context: TransportContext, input: {
|
|
3920
|
+
readonly bearer: string;
|
|
3921
|
+
readonly threadId: string;
|
|
3922
|
+
}): Promise<MessagingOkResponse>;
|
|
3923
|
+
declare function updateThreadSettings(context: TransportContext, input: {
|
|
3924
|
+
readonly bearer: string;
|
|
3925
|
+
readonly threadId: string;
|
|
3926
|
+
readonly body: UpdateThreadSettingsBody;
|
|
3927
|
+
}): Promise<GroupThreadMutationResponse>;
|
|
3928
|
+
declare function hideThread(context: TransportContext, input: {
|
|
3929
|
+
readonly bearer: string;
|
|
3930
|
+
readonly threadId: string;
|
|
3931
|
+
}): Promise<MessagingOkResponse>;
|
|
3932
|
+
declare function inviteParticipants(context: TransportContext, input: {
|
|
3933
|
+
readonly bearer: string;
|
|
3934
|
+
readonly threadId: string;
|
|
3935
|
+
readonly body: InviteParticipantsBody;
|
|
3936
|
+
}): Promise<GroupThreadMutationResponse>;
|
|
3937
|
+
declare function leaveThread(context: TransportContext, input: {
|
|
3938
|
+
readonly bearer: string;
|
|
3939
|
+
readonly threadId: string;
|
|
3940
|
+
}): Promise<MessagingOkResponse>;
|
|
3941
|
+
declare function pinThread(context: TransportContext, input: {
|
|
3942
|
+
readonly bearer: string;
|
|
3943
|
+
readonly threadId: string;
|
|
3944
|
+
}): Promise<PinThreadResponse>;
|
|
3945
|
+
declare function unpinThread(context: TransportContext, input: {
|
|
3946
|
+
readonly bearer: string;
|
|
3947
|
+
readonly threadId: string;
|
|
3948
|
+
}): Promise<MessagingOkResponse>;
|
|
3949
|
+
//#endregion
|
|
3950
|
+
//#region src/oauth/pkce.d.ts
|
|
3951
|
+
type PkcePair = {
|
|
3952
|
+
readonly codeVerifier: string;
|
|
3953
|
+
readonly codeChallenge: string;
|
|
3954
|
+
};
|
|
3955
|
+
declare function generatePkce(): Promise<PkcePair>;
|
|
3956
|
+
declare function sha256Base64Url(input: string): Promise<string>;
|
|
3957
|
+
declare function generateState(byteLength?: number): string;
|
|
3958
|
+
//#endregion
|
|
3959
|
+
//#region src/oauth/authorize-url.d.ts
|
|
3960
|
+
type BuildAuthorizeUrlInput = {
|
|
3961
|
+
readonly issuer: string;
|
|
3962
|
+
readonly clientId: string;
|
|
3963
|
+
readonly redirectUri: string;
|
|
3964
|
+
readonly scopes: readonly OauthScope[];
|
|
3965
|
+
readonly state?: string | undefined;
|
|
3966
|
+
readonly pkce?: PkcePair | undefined;
|
|
3967
|
+
readonly forceConsent?: boolean | undefined;
|
|
3968
|
+
};
|
|
3969
|
+
type AuthorizeUrl = {
|
|
3970
|
+
readonly url: string;
|
|
3971
|
+
readonly state: string;
|
|
3972
|
+
readonly codeVerifier: string;
|
|
3973
|
+
readonly codeChallenge: string;
|
|
3974
|
+
};
|
|
3975
|
+
declare function buildAuthorizeUrl(input: BuildAuthorizeUrlInput): Promise<AuthorizeUrl>;
|
|
3976
|
+
//#endregion
|
|
3977
|
+
//#region src/oauth/client-credentials.d.ts
|
|
3978
|
+
declare function mintClientCredentialsToken(context: TransportContext, input: {
|
|
3979
|
+
readonly clientId: string;
|
|
3980
|
+
readonly clientSecret: string;
|
|
3981
|
+
readonly scope?: readonly OauthScope[] | undefined;
|
|
3982
|
+
}): Promise<OauthTokenResponse>;
|
|
3983
|
+
type AppTokenCache = {
|
|
3984
|
+
readonly getAccessToken: (scope?: readonly OauthScope[]) => Promise<string>;
|
|
3985
|
+
readonly invalidate: () => void;
|
|
3986
|
+
};
|
|
3987
|
+
declare function createAppTokenCache(options: {
|
|
3988
|
+
readonly ctx: TransportContext;
|
|
3989
|
+
readonly clientId: string;
|
|
3990
|
+
readonly clientSecret: string;
|
|
3991
|
+
readonly skewMs?: number;
|
|
3992
|
+
}): AppTokenCache;
|
|
3993
|
+
//#endregion
|
|
3994
|
+
//#region src/oauth/discovery.d.ts
|
|
3995
|
+
declare function fetchAuthorizationServerMetadata(context: TransportContext): Promise<OauthAuthorizationServerMetadata>;
|
|
3996
|
+
declare function defaultEndpoints(issuer: string): {
|
|
3997
|
+
authorize: string;
|
|
3998
|
+
token: string;
|
|
3999
|
+
userinfo: string;
|
|
4000
|
+
revoke: string;
|
|
4001
|
+
};
|
|
4002
|
+
//#endregion
|
|
4003
|
+
//#region src/oauth/registration.d.ts
|
|
4004
|
+
declare function registerOauthClient(context: TransportContext, input: OauthClientRegistrationRequest): Promise<OauthClientRegistrationResponse>;
|
|
4005
|
+
//#endregion
|
|
4006
|
+
//#region src/oauth/revoke.d.ts
|
|
4007
|
+
declare function revokeToken(context: TransportContext, input: {
|
|
4008
|
+
readonly token: string;
|
|
4009
|
+
readonly tokenTypeHint?: "access_token" | "refresh_token" | undefined;
|
|
4010
|
+
readonly clientId: string;
|
|
4011
|
+
readonly clientSecret?: string | undefined;
|
|
4012
|
+
}): Promise<void>;
|
|
4013
|
+
//#endregion
|
|
4014
|
+
//#region src/oauth/token.d.ts
|
|
4015
|
+
declare function exchangeAuthorizationCode(context: TransportContext, input: {
|
|
4016
|
+
readonly code: string;
|
|
4017
|
+
readonly redirectUri: string;
|
|
4018
|
+
readonly codeVerifier: string;
|
|
4019
|
+
readonly clientId: string;
|
|
4020
|
+
readonly clientSecret?: string | undefined;
|
|
4021
|
+
}): Promise<OauthTokenResponse>;
|
|
4022
|
+
declare function refreshAccessToken(context: TransportContext, input: {
|
|
4023
|
+
readonly refreshToken: string;
|
|
4024
|
+
readonly clientId: string;
|
|
4025
|
+
readonly clientSecret?: string | undefined;
|
|
4026
|
+
readonly scope?: readonly OauthScope[] | undefined;
|
|
4027
|
+
}): Promise<OauthTokenResponse>;
|
|
4028
|
+
declare function toTokenSet(now: number, response: OauthTokenResponse): TokenSet;
|
|
4029
|
+
//#endregion
|
|
4030
|
+
//#region src/oauth/userinfo.d.ts
|
|
4031
|
+
declare function fetchUserInfo(context: TransportContext, input: {
|
|
4032
|
+
readonly bearer: string;
|
|
4033
|
+
}): Promise<OauthUserInfoResponse>;
|
|
4034
|
+
//#endregion
|
|
4035
|
+
//#region src/payments/appeal.d.ts
|
|
4036
|
+
declare function fileAppeal(context: TransportContext, input: {
|
|
4037
|
+
readonly bearer: string;
|
|
4038
|
+
readonly body: AppealFileRequest;
|
|
4039
|
+
}): Promise<AppealFileResponse>;
|
|
4040
|
+
declare function fileAppealPotLeg(context: TransportContext, input: {
|
|
4041
|
+
readonly bearer: string;
|
|
4042
|
+
readonly body: AppealPotLegFileRequest;
|
|
4043
|
+
}): Promise<AppealFileResponse>;
|
|
4044
|
+
//#endregion
|
|
4045
|
+
//#region src/payments/appeal-room.d.ts
|
|
4046
|
+
declare function getAppealRoom(context: TransportContext, input: {
|
|
4047
|
+
readonly bearer: string;
|
|
4048
|
+
readonly appealId: string;
|
|
4049
|
+
}): Promise<AppealRoomView>;
|
|
4050
|
+
declare function postAppealRoomMessage(context: TransportContext, input: {
|
|
4051
|
+
readonly bearer: string;
|
|
4052
|
+
readonly appealId: string;
|
|
4053
|
+
readonly body: AppealRoomPostRequest;
|
|
4054
|
+
}): Promise<AppealRoomPostResponse>;
|
|
4055
|
+
declare function uploadAppealRoomAttachment(context: TransportContext, input: {
|
|
4056
|
+
readonly bearer: string;
|
|
4057
|
+
readonly appealId: string;
|
|
4058
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
4059
|
+
readonly filename: string;
|
|
4060
|
+
readonly contentType: string;
|
|
4061
|
+
}): Promise<UploadAttachmentResponse>;
|
|
4062
|
+
//#endregion
|
|
4063
|
+
//#region src/payments/cancel-pot.d.ts
|
|
4064
|
+
declare function cancelPot(context: TransportContext, input: {
|
|
4065
|
+
readonly appBearer: string;
|
|
4066
|
+
readonly body: OauthPaymentCancelPotRequest;
|
|
4067
|
+
}): Promise<OauthPaymentCancelPotResponse>;
|
|
4068
|
+
//#endregion
|
|
4069
|
+
//#region src/payments/charge.d.ts
|
|
4070
|
+
type ChargeResult = OauthPaymentChargeResponse | ({
|
|
4071
|
+
status: "monthly_limit_exceeded";
|
|
4072
|
+
} & Omit<OauthPaymentChargeLimitExceeded, "error">);
|
|
4073
|
+
declare function charge(context: TransportContext, input: {
|
|
4074
|
+
readonly bearer: string;
|
|
4075
|
+
readonly body: OauthPaymentChargeRequest;
|
|
4076
|
+
readonly idempotencyKey?: string;
|
|
4077
|
+
}): Promise<ChargeResult>;
|
|
4078
|
+
//#endregion
|
|
4079
|
+
//#region src/payments/distribute.d.ts
|
|
4080
|
+
declare function distributePot(context: TransportContext, input: {
|
|
4081
|
+
readonly appBearer: string;
|
|
4082
|
+
readonly body: OauthPaymentDistributeRequest;
|
|
4083
|
+
}): Promise<OauthPaymentDistributeResponse>;
|
|
4084
|
+
//#endregion
|
|
4085
|
+
//#region src/payments/intent.d.ts
|
|
4086
|
+
declare function getPaymentIntent(context: TransportContext, input: {
|
|
4087
|
+
readonly bearer: string;
|
|
4088
|
+
readonly intentId: string;
|
|
4089
|
+
}): Promise<OauthPaymentIntentContext>;
|
|
4090
|
+
declare function signPaymentIntent(context: TransportContext, input: {
|
|
4091
|
+
readonly bearer: string;
|
|
4092
|
+
readonly intentId: string;
|
|
4093
|
+
}): Promise<OauthPaymentIntentSignResponse>;
|
|
4094
|
+
declare function completePaymentIntent(context: TransportContext, input: {
|
|
4095
|
+
readonly bearer: string;
|
|
4096
|
+
readonly intentId: string;
|
|
4097
|
+
readonly body: OauthPaymentIntentComplete;
|
|
4098
|
+
}): Promise<OauthPaymentIntentResolveResponse>;
|
|
4099
|
+
declare function denyPaymentIntent(context: TransportContext, input: {
|
|
4100
|
+
readonly bearer: string;
|
|
4101
|
+
readonly intentId: string;
|
|
4102
|
+
}): Promise<OauthPaymentIntentResolveResponse>;
|
|
4103
|
+
//#endregion
|
|
4104
|
+
//#region src/payments/limits.d.ts
|
|
4105
|
+
declare function getPaymentLimits(context: TransportContext, input: {
|
|
4106
|
+
readonly bearer: string;
|
|
4107
|
+
}): Promise<OauthPaymentLimitsResponse>;
|
|
4108
|
+
//#endregion
|
|
4109
|
+
//#region src/payments/moonpay.d.ts
|
|
4110
|
+
declare function getMoonpayAvailability(context: TransportContext, input: {
|
|
4111
|
+
readonly bearer: string;
|
|
4112
|
+
}): Promise<MoonpayAvailabilityResponse>;
|
|
4113
|
+
declare function mintMoonpayBuyUrl(context: TransportContext, input: {
|
|
4114
|
+
readonly bearer: string;
|
|
4115
|
+
readonly body: MoonpayBuyUrlRequest;
|
|
4116
|
+
}): Promise<MoonpayBuyUrlResponse>;
|
|
4117
|
+
declare function mintMoonpaySellUrl(context: TransportContext, input: {
|
|
4118
|
+
readonly bearer: string;
|
|
4119
|
+
readonly body: MoonpaySellUrlRequest;
|
|
4120
|
+
}): Promise<MoonpaySellUrlResponse>;
|
|
4121
|
+
//#endregion
|
|
4122
|
+
//#region src/payments/payout.d.ts
|
|
4123
|
+
declare function requestPayout(context: TransportContext, input: {
|
|
4124
|
+
readonly appBearer: string;
|
|
4125
|
+
readonly body: OauthPaymentPayoutRequest;
|
|
4126
|
+
}): Promise<OauthPaymentPayoutResponse>;
|
|
4127
|
+
//#endregion
|
|
4128
|
+
//#region src/payments/price.d.ts
|
|
4129
|
+
declare function getPaymentPrice(context: TransportContext, input: {
|
|
4130
|
+
readonly bearer: string;
|
|
4131
|
+
} & GetOauthPaymentsPriceData["query"]): Promise<OauthPaymentPriceResponse>;
|
|
4132
|
+
//#endregion
|
|
4133
|
+
//#region src/payments/status.d.ts
|
|
4134
|
+
declare function getIntentStatus(context: TransportContext, input: {
|
|
4135
|
+
readonly bearer: string;
|
|
4136
|
+
readonly intentId: string;
|
|
4137
|
+
}): Promise<OauthPaymentIntentStatus>;
|
|
4138
|
+
//#endregion
|
|
4139
|
+
//#region src/payments/tron.d.ts
|
|
4140
|
+
declare function getTronBalance(context: TransportContext, input: {
|
|
4141
|
+
readonly bearer: string;
|
|
4142
|
+
}): Promise<TronBalanceResponse>;
|
|
4143
|
+
declare function listTronLedger(context: TransportContext, input: {
|
|
4144
|
+
readonly bearer: string;
|
|
4145
|
+
readonly before?: string;
|
|
4146
|
+
}): Promise<TronLedgerResponse>;
|
|
4147
|
+
declare function createTronDeposit(context: TransportContext, input: {
|
|
4148
|
+
readonly bearer: string;
|
|
4149
|
+
readonly body: TronDepositRequest;
|
|
4150
|
+
}): Promise<TronDepositResponse>;
|
|
4151
|
+
declare function createTronTransfer(context: TransportContext, input: {
|
|
4152
|
+
readonly bearer: string;
|
|
4153
|
+
readonly body: TronTransferRequest;
|
|
4154
|
+
readonly idempotencyKey?: string;
|
|
4155
|
+
}): Promise<TronTransferResponse>;
|
|
4156
|
+
declare function getTronSecurity(context: TransportContext, input: {
|
|
4157
|
+
readonly bearer: string;
|
|
4158
|
+
}): Promise<TronSecuritySetting>;
|
|
4159
|
+
declare function setTronSecurity(context: TransportContext, input: {
|
|
4160
|
+
readonly bearer: string;
|
|
4161
|
+
readonly setting: TronSecuritySetting;
|
|
4162
|
+
}): Promise<TronSecuritySetting>;
|
|
4163
|
+
declare function createTronTransferChallenge(context: TransportContext, input: {
|
|
4164
|
+
readonly bearer: string;
|
|
4165
|
+
readonly body: TronTransferChallengeRequest;
|
|
4166
|
+
}): Promise<TronTransferChallengeResponse>;
|
|
4167
|
+
declare function createTronConnectOnboarding(context: TransportContext, input: {
|
|
4168
|
+
readonly bearer: string;
|
|
4169
|
+
}): Promise<TronConnectOnboardingResponse>;
|
|
4170
|
+
declare function createTronCashout(context: TransportContext, input: {
|
|
4171
|
+
readonly bearer: string;
|
|
4172
|
+
readonly body: TronCashoutCreateRequest;
|
|
4173
|
+
}): Promise<TronCashoutItem>;
|
|
4174
|
+
declare function listTronCashouts(context: TransportContext, input: {
|
|
4175
|
+
readonly bearer: string;
|
|
4176
|
+
}): Promise<TronCashoutListResponse>;
|
|
4177
|
+
//#endregion
|
|
4178
|
+
//#region src/payments/tron-game.d.ts
|
|
4179
|
+
declare function chargeTronPot(context: TransportContext, input: {
|
|
4180
|
+
readonly bearer: string;
|
|
4181
|
+
readonly idempotencyKey: string;
|
|
4182
|
+
readonly body: TronChargeRequest;
|
|
4183
|
+
}): Promise<TronChargeResponse>;
|
|
4184
|
+
declare function chargeTronDirect(context: TransportContext, input: {
|
|
4185
|
+
readonly bearer: string;
|
|
4186
|
+
readonly idempotencyKey: string;
|
|
4187
|
+
readonly body: TronDirectChargeRequest;
|
|
4188
|
+
}): Promise<TronDirectChargeResponse>;
|
|
4189
|
+
declare function distributeTronPot(context: TransportContext, input: {
|
|
4190
|
+
readonly bearer: string;
|
|
4191
|
+
readonly idempotencyKey: string;
|
|
4192
|
+
readonly body: TronDistributeRequest;
|
|
4193
|
+
}): Promise<TronDistributeResponse>;
|
|
4194
|
+
declare function getTronGameBalance(context: TransportContext, input: {
|
|
4195
|
+
readonly bearer: string;
|
|
4196
|
+
}): Promise<TronGameBalanceResponse>;
|
|
4197
|
+
//#endregion
|
|
4198
|
+
//#region src/presence/embed.d.ts
|
|
4199
|
+
type PresenceStatus = "idle" | "connecting" | "pending" | "active" | "ended" | "error";
|
|
4200
|
+
type MountPresenceWidgetOptions = {
|
|
4201
|
+
readonly apiOrigin: string;
|
|
4202
|
+
readonly clientId: string;
|
|
4203
|
+
readonly gameOrigin?: string;
|
|
4204
|
+
readonly container?: HTMLElement;
|
|
4205
|
+
readonly onPlaySessionId?: (playSessionId: string | null) => void;
|
|
4206
|
+
readonly onStatus?: (status: PresenceStatus) => void;
|
|
4207
|
+
readonly onAuthChange?: (isAuthenticated: boolean) => void;
|
|
4208
|
+
readonly styleIframe?: (iframe: HTMLIFrameElement) => void;
|
|
4209
|
+
readonly onPresentationChange?: (mode: "chip" | "overlay") => void;
|
|
4210
|
+
readonly background?: string;
|
|
4211
|
+
};
|
|
4212
|
+
type PresenceWidgetHandle = {
|
|
4213
|
+
readonly destroy: () => void;
|
|
4214
|
+
};
|
|
4215
|
+
declare function mountPresenceWidget(options: MountPresenceWidgetOptions): PresenceWidgetHandle;
|
|
4216
|
+
//#endregion
|
|
4217
|
+
//#region src/presence/game-half.d.ts
|
|
4218
|
+
type GameHalfCredentials = {
|
|
4219
|
+
readonly clientId: string;
|
|
4220
|
+
readonly clientSecret: string;
|
|
4221
|
+
};
|
|
4222
|
+
type PlaySessionGameStatus = "pending" | "active" | "ended";
|
|
4223
|
+
type ConfirmResponse = {
|
|
4224
|
+
readonly playSessionId: string;
|
|
4225
|
+
readonly status: PlaySessionGameStatus;
|
|
4226
|
+
};
|
|
4227
|
+
type StatusResponse = {
|
|
4228
|
+
readonly status: PlaySessionGameStatus;
|
|
4229
|
+
};
|
|
4230
|
+
declare function confirmPlaySession(context: TransportContext, input: {
|
|
4231
|
+
readonly credentials: GameHalfCredentials;
|
|
4232
|
+
readonly playSessionId: string;
|
|
4233
|
+
readonly userId: string;
|
|
4234
|
+
}): Promise<ConfirmResponse>;
|
|
4235
|
+
declare function heartbeatPlaySession(context: TransportContext, input: {
|
|
4236
|
+
readonly credentials: GameHalfCredentials;
|
|
4237
|
+
readonly playSessionId: string;
|
|
4238
|
+
}): Promise<StatusResponse>;
|
|
4239
|
+
declare function endPlaySession(context: TransportContext, input: {
|
|
4240
|
+
readonly credentials: GameHalfCredentials;
|
|
4241
|
+
readonly playSessionId: string;
|
|
4242
|
+
}): Promise<StatusResponse>;
|
|
4243
|
+
//#endregion
|
|
4244
|
+
//#region src/reads/messaging.d.ts
|
|
4245
|
+
declare function listThreads(context: TransportContext, input: {
|
|
4246
|
+
readonly bearer: string;
|
|
4247
|
+
readonly limit?: number;
|
|
4248
|
+
readonly cursor?: string;
|
|
4249
|
+
}): Promise<ThreadListResponse>;
|
|
4250
|
+
declare function createDirectThread(context: TransportContext, input: {
|
|
4251
|
+
readonly bearer: string;
|
|
4252
|
+
readonly body: CreateDirectThreadBody;
|
|
4253
|
+
}): Promise<ThreadSummary>;
|
|
4254
|
+
declare function listThreadMessages(context: TransportContext, input: {
|
|
4255
|
+
readonly bearer: string;
|
|
4256
|
+
readonly threadId: string;
|
|
4257
|
+
readonly limit?: number;
|
|
4258
|
+
readonly cursor?: string;
|
|
4259
|
+
}): Promise<MessagesPageResponse>;
|
|
4260
|
+
declare function sendMessage(context: TransportContext, input: {
|
|
4261
|
+
readonly bearer: string;
|
|
4262
|
+
readonly threadId: string;
|
|
4263
|
+
readonly body: SendMessageBody;
|
|
4264
|
+
}): Promise<void>;
|
|
4265
|
+
declare function markThreadRead(context: TransportContext, input: {
|
|
4266
|
+
readonly bearer: string;
|
|
4267
|
+
readonly threadId: string;
|
|
4268
|
+
}): Promise<void>;
|
|
4269
|
+
declare function uploadAttachment(context: TransportContext, input: {
|
|
4270
|
+
readonly bearer: string;
|
|
4271
|
+
readonly threadId: string;
|
|
4272
|
+
readonly file: Blob | ArrayBufferView | ArrayBuffer;
|
|
4273
|
+
readonly filename: string;
|
|
4274
|
+
readonly contentType: string;
|
|
4275
|
+
}): Promise<UploadAttachmentResponse>;
|
|
4276
|
+
//#endregion
|
|
4277
|
+
//#region src/reads/notifications.d.ts
|
|
4278
|
+
declare function listNotifications(context: TransportContext, input: {
|
|
4279
|
+
readonly bearer: string;
|
|
4280
|
+
readonly limit?: number;
|
|
4281
|
+
readonly cursor?: string;
|
|
4282
|
+
}): Promise<NotificationListResponse>;
|
|
4283
|
+
declare function updateNotification(context: TransportContext, input: {
|
|
4284
|
+
readonly bearer: string;
|
|
4285
|
+
readonly notificationId: string;
|
|
4286
|
+
readonly body: NotificationUpdate;
|
|
4287
|
+
}): Promise<void>;
|
|
4288
|
+
declare function markAllNotificationsRead(context: TransportContext, input: {
|
|
4289
|
+
readonly bearer: string;
|
|
4290
|
+
}): Promise<void>;
|
|
4291
|
+
//#endregion
|
|
4292
|
+
//#region src/reads/playtime.d.ts
|
|
4293
|
+
declare function getPlaytime(context: TransportContext, input: {
|
|
4294
|
+
readonly bearer: string;
|
|
4295
|
+
}): Promise<PlaytimeOverview>;
|
|
4296
|
+
declare function getPlaytimeTimeseries(context: TransportContext, input: {
|
|
4297
|
+
readonly bearer: string;
|
|
4298
|
+
readonly days?: number;
|
|
4299
|
+
}): Promise<PlaytimeTimeseries>;
|
|
4300
|
+
//#endregion
|
|
4301
|
+
//#region src/reads/profile.d.ts
|
|
4302
|
+
declare function getPublicProfile(context: TransportContext, input: {
|
|
4303
|
+
readonly bearer?: string;
|
|
4304
|
+
readonly handle: string;
|
|
4305
|
+
}): Promise<PublicProfile>;
|
|
4306
|
+
declare function searchUsers(context: TransportContext, input: {
|
|
4307
|
+
readonly bearer: string;
|
|
4308
|
+
readonly q: string;
|
|
4309
|
+
readonly limit?: number;
|
|
4310
|
+
}): Promise<UserSearchResponse>;
|
|
4311
|
+
//#endregion
|
|
4312
|
+
//#region src/reads/referral.d.ts
|
|
4313
|
+
declare function getReferral(context: TransportContext, input: {
|
|
4314
|
+
readonly bearer: string;
|
|
4315
|
+
}): Promise<ReferralOverview>;
|
|
4316
|
+
declare function createReferralCode(context: TransportContext, input: {
|
|
4317
|
+
readonly bearer: string;
|
|
4318
|
+
readonly regenerate?: boolean;
|
|
4319
|
+
}): Promise<ReferralCodeResponse>;
|
|
4320
|
+
declare function previewReferral(context: TransportContext, input: {
|
|
4321
|
+
readonly bearer: string;
|
|
4322
|
+
readonly code: string;
|
|
4323
|
+
}): Promise<ReferralPreviewResponse>;
|
|
4324
|
+
declare function bindReferral(context: TransportContext, input: {
|
|
4325
|
+
readonly bearer: string;
|
|
4326
|
+
} & ReferralBindRequest): Promise<ReferralBindResponse>;
|
|
4327
|
+
//#endregion
|
|
4328
|
+
//#region src/reads/social-graph.d.ts
|
|
4329
|
+
declare function followUser(context: TransportContext, input: {
|
|
4330
|
+
readonly bearer: string;
|
|
4331
|
+
readonly userId: string;
|
|
4332
|
+
}): Promise<void>;
|
|
4333
|
+
declare function unfollowUser(context: TransportContext, input: {
|
|
4334
|
+
readonly bearer: string;
|
|
4335
|
+
readonly userId: string;
|
|
4336
|
+
}): Promise<void>;
|
|
4337
|
+
declare function sendFriendRequest(context: TransportContext, input: {
|
|
4338
|
+
readonly bearer: string;
|
|
4339
|
+
readonly userId: string;
|
|
4340
|
+
}): Promise<void>;
|
|
4341
|
+
declare function removeFriend(context: TransportContext, input: {
|
|
4342
|
+
readonly bearer: string;
|
|
4343
|
+
readonly userId: string;
|
|
4344
|
+
}): Promise<void>;
|
|
4345
|
+
declare function decideFriendRequest(context: TransportContext, input: {
|
|
4346
|
+
readonly bearer: string;
|
|
4347
|
+
readonly requestId: string;
|
|
4348
|
+
readonly decision: FriendRequestDecision["decision"];
|
|
4349
|
+
}): Promise<void>;
|
|
4350
|
+
declare function cancelFriendRequest(context: TransportContext, input: {
|
|
4351
|
+
readonly bearer: string;
|
|
4352
|
+
readonly requestId: string;
|
|
4353
|
+
}): Promise<void>;
|
|
4354
|
+
declare function listFriends(context: TransportContext, input: {
|
|
4355
|
+
readonly bearer: string;
|
|
4356
|
+
}): Promise<FriendListResponse>;
|
|
4357
|
+
declare function listFriendsForApp(context: TransportContext, input: {
|
|
4358
|
+
readonly bearer: string;
|
|
4359
|
+
}): Promise<AppFriendListResponse>;
|
|
4360
|
+
//#endregion
|
|
4361
|
+
//#region src/reads/socials.d.ts
|
|
4362
|
+
declare function listSocials(context: TransportContext, input: {
|
|
4363
|
+
readonly bearer: string;
|
|
4364
|
+
}): Promise<SocialListResponse>;
|
|
4365
|
+
//#endregion
|
|
4366
|
+
//#region src/reads/wallets.d.ts
|
|
4367
|
+
declare function listWallets(context: TransportContext, input: {
|
|
4368
|
+
readonly bearer: string;
|
|
4369
|
+
}): Promise<WalletListResponse>;
|
|
4370
|
+
//#endregion
|
|
4371
|
+
//#region src/wallets-mgmt/delegation.d.ts
|
|
4372
|
+
declare function getDelegation(context: TransportContext, input: {
|
|
4373
|
+
readonly bearer: string;
|
|
4374
|
+
readonly address: string;
|
|
4375
|
+
}): Promise<WalletDelegationStatus>;
|
|
4376
|
+
declare function createDelegation(context: TransportContext, input: {
|
|
4377
|
+
readonly bearer: string;
|
|
4378
|
+
readonly address: string;
|
|
4379
|
+
readonly body: CreateWalletDelegation;
|
|
4380
|
+
}): Promise<CreateWalletDelegationResponse>;
|
|
4381
|
+
declare function deleteDelegation(context: TransportContext, input: {
|
|
4382
|
+
readonly bearer: string;
|
|
4383
|
+
readonly address: string;
|
|
4384
|
+
}): Promise<DeleteWalletDelegationResponse>;
|
|
4385
|
+
//#endregion
|
|
4386
|
+
//#region src/wallets-mgmt/label.d.ts
|
|
4387
|
+
declare function updateWalletLabel(context: TransportContext, input: {
|
|
4388
|
+
readonly bearer: string;
|
|
4389
|
+
readonly address: string;
|
|
4390
|
+
readonly body: WalletLabelUpdate;
|
|
4391
|
+
}): Promise<WalletLabelUpdateResponse>;
|
|
4392
|
+
//#endregion
|
|
4393
|
+
//#region src/wallets-mgmt/list.d.ts
|
|
4394
|
+
declare function listWalletManager(context: TransportContext, input: {
|
|
4395
|
+
readonly bearer: string;
|
|
4396
|
+
}): Promise<WalletListResponse>;
|
|
4397
|
+
//#endregion
|
|
4398
|
+
//#region src/node/client.d.ts
|
|
4399
|
+
declare class TronNodeClient {
|
|
4400
|
+
private readonly ctx;
|
|
4401
|
+
private readonly clientId;
|
|
4402
|
+
private readonly clientSecret;
|
|
4403
|
+
private readonly tokenStore?;
|
|
4404
|
+
private readonly appTokenCache;
|
|
4405
|
+
constructor(config: NodeClientConfig);
|
|
4406
|
+
get transport(): TransportContext;
|
|
4407
|
+
getAppAccessToken(scope?: readonly OauthScope[]): Promise<string>;
|
|
4408
|
+
get oauth(): {
|
|
4409
|
+
discover: () => Promise<OauthAuthorizationServerMetadata>;
|
|
4410
|
+
exchangeCode: (input: {
|
|
4411
|
+
code: string;
|
|
4412
|
+
redirectUri: string;
|
|
4413
|
+
codeVerifier: string;
|
|
4414
|
+
}) => Promise<OauthTokenResponse>;
|
|
4415
|
+
refresh: (input: {
|
|
4416
|
+
refreshToken: string;
|
|
4417
|
+
scope?: readonly OauthScope[];
|
|
4418
|
+
}) => Promise<OauthTokenResponse>;
|
|
4419
|
+
revoke: (input: {
|
|
4420
|
+
token: string;
|
|
4421
|
+
tokenTypeHint?: "access_token" | "refresh_token";
|
|
4422
|
+
}) => Promise<void>;
|
|
4423
|
+
userInfo: (input: {
|
|
4424
|
+
bearer: string;
|
|
4425
|
+
}) => Promise<OauthUserInfoResponse>;
|
|
4426
|
+
toTokenSet: typeof toTokenSet;
|
|
4427
|
+
};
|
|
4428
|
+
get payments(): {
|
|
4429
|
+
charge: (input: {
|
|
4430
|
+
bearer: string;
|
|
4431
|
+
body: OauthPaymentChargeRequest;
|
|
4432
|
+
idempotencyKey?: string;
|
|
4433
|
+
}) => Promise<ChargeResult>;
|
|
4434
|
+
limits: (input: {
|
|
4435
|
+
bearer: string;
|
|
4436
|
+
}) => Promise<OauthPaymentLimitsResponse>;
|
|
4437
|
+
price: (input: {
|
|
4438
|
+
bearer: string;
|
|
4439
|
+
} & GetOauthPaymentsPriceData["query"]) => Promise<OauthPaymentPriceResponse>;
|
|
4440
|
+
status: (input: {
|
|
4441
|
+
bearer: string;
|
|
4442
|
+
intentId: string;
|
|
4443
|
+
}) => Promise<OauthPaymentIntentStatus>;
|
|
4444
|
+
payout: (input: {
|
|
4445
|
+
body: OauthPaymentPayoutRequest;
|
|
4446
|
+
}) => Promise<OauthPaymentPayoutResponse>;
|
|
4447
|
+
distribute: (input: {
|
|
4448
|
+
body: OauthPaymentDistributeRequest;
|
|
4449
|
+
}) => Promise<OauthPaymentDistributeResponse>;
|
|
4450
|
+
cancelPot: (input: {
|
|
4451
|
+
body: OauthPaymentCancelPotRequest;
|
|
4452
|
+
}) => Promise<OauthPaymentCancelPotResponse>;
|
|
4453
|
+
tronBalance: (input: {
|
|
4454
|
+
bearer: string;
|
|
4455
|
+
}) => Promise<TronGameBalanceResponse>;
|
|
4456
|
+
tronCharge: (input: {
|
|
4457
|
+
bearer: string;
|
|
4458
|
+
idempotencyKey: string;
|
|
4459
|
+
body: TronChargeRequest;
|
|
4460
|
+
}) => Promise<TronChargeResponse>;
|
|
4461
|
+
tronDistribute: (input: {
|
|
4462
|
+
idempotencyKey: string;
|
|
4463
|
+
body: TronDistributeRequest;
|
|
4464
|
+
}) => Promise<TronDistributeResponse>;
|
|
4465
|
+
intent: {
|
|
4466
|
+
get: (input: {
|
|
4467
|
+
bearer: string;
|
|
4468
|
+
intentId: string;
|
|
4469
|
+
}) => Promise<OauthPaymentIntentContext>;
|
|
4470
|
+
sign: (input: {
|
|
4471
|
+
bearer: string;
|
|
4472
|
+
intentId: string;
|
|
4473
|
+
}) => Promise<OauthPaymentIntentSignResponse>;
|
|
4474
|
+
complete: (input: {
|
|
4475
|
+
bearer: string;
|
|
4476
|
+
intentId: string;
|
|
4477
|
+
body: OauthPaymentIntentComplete;
|
|
4478
|
+
}) => Promise<OauthPaymentIntentResolveResponse>;
|
|
4479
|
+
deny: (input: {
|
|
4480
|
+
bearer: string;
|
|
4481
|
+
intentId: string;
|
|
4482
|
+
}) => Promise<OauthPaymentIntentResolveResponse>;
|
|
4483
|
+
};
|
|
4484
|
+
};
|
|
4485
|
+
subscribeOauthPaymentEvents(lifecycle: OauthPaymentEventsSubscriberLifecycle): OauthPaymentEventsSubscriber;
|
|
4486
|
+
subscribeOauthInventoryEvents(lifecycle: OauthInventoryEventsSubscriberLifecycle): OauthInventoryEventsSubscriber;
|
|
4487
|
+
get users(): {
|
|
4488
|
+
get: (input: {
|
|
4489
|
+
bearer?: string;
|
|
4490
|
+
handle: string;
|
|
4491
|
+
}) => Promise<PublicProfile>;
|
|
4492
|
+
search: (input: {
|
|
4493
|
+
bearer: string;
|
|
4494
|
+
q: string;
|
|
4495
|
+
limit?: number;
|
|
4496
|
+
}) => Promise<UserSearchResponse>;
|
|
4497
|
+
follow: (input: {
|
|
4498
|
+
bearer: string;
|
|
4499
|
+
userId: string;
|
|
4500
|
+
}) => Promise<void>;
|
|
4501
|
+
unfollow: (input: {
|
|
4502
|
+
bearer: string;
|
|
4503
|
+
userId: string;
|
|
4504
|
+
}) => Promise<void>;
|
|
4505
|
+
friendRequest: (input: {
|
|
4506
|
+
bearer: string;
|
|
4507
|
+
userId: string;
|
|
4508
|
+
}) => Promise<void>;
|
|
4509
|
+
decideFriendRequest: (input: {
|
|
4510
|
+
bearer: string;
|
|
4511
|
+
requestId: string;
|
|
4512
|
+
decision: "accept" | "reject";
|
|
4513
|
+
}) => Promise<void>;
|
|
4514
|
+
cancelFriendRequest: (input: {
|
|
4515
|
+
bearer: string;
|
|
4516
|
+
requestId: string;
|
|
4517
|
+
}) => Promise<void>;
|
|
4518
|
+
friends: (input: {
|
|
4519
|
+
bearer: string;
|
|
4520
|
+
}) => Promise<FriendListResponse>;
|
|
4521
|
+
me: (input: {
|
|
4522
|
+
bearer: string;
|
|
4523
|
+
}) => Promise<unknown>;
|
|
4524
|
+
};
|
|
4525
|
+
get messaging(): {
|
|
4526
|
+
listThreads: (input: {
|
|
4527
|
+
bearer: string;
|
|
4528
|
+
limit?: number;
|
|
4529
|
+
cursor?: string;
|
|
4530
|
+
}) => Promise<ThreadListResponse>;
|
|
4531
|
+
createDirect: (input: Parameters<typeof createDirectThread>[1]) => Promise<ThreadSummary>;
|
|
4532
|
+
listMessages: (input: {
|
|
4533
|
+
bearer: string;
|
|
4534
|
+
threadId: string;
|
|
4535
|
+
limit?: number;
|
|
4536
|
+
cursor?: string;
|
|
4537
|
+
}) => Promise<MessagesPageResponse>;
|
|
4538
|
+
send: (input: Parameters<typeof sendMessage>[1]) => Promise<void>;
|
|
4539
|
+
markRead: (input: {
|
|
4540
|
+
bearer: string;
|
|
4541
|
+
threadId: string;
|
|
4542
|
+
}) => Promise<void>;
|
|
4543
|
+
uploadAttachment: (input: Parameters<typeof uploadAttachment>[1]) => Promise<UploadAttachmentResponse>;
|
|
4544
|
+
};
|
|
4545
|
+
get notifications(): {
|
|
4546
|
+
list: (input: {
|
|
4547
|
+
bearer: string;
|
|
4548
|
+
limit?: number;
|
|
4549
|
+
cursor?: string;
|
|
4550
|
+
}) => Promise<NotificationListResponse>;
|
|
4551
|
+
markAllRead: (input: {
|
|
4552
|
+
bearer: string;
|
|
4553
|
+
}) => Promise<void>;
|
|
4554
|
+
};
|
|
4555
|
+
get presence(): {
|
|
4556
|
+
confirm: (input: {
|
|
4557
|
+
playSessionId: string;
|
|
4558
|
+
userId: string;
|
|
4559
|
+
}) => Promise<{
|
|
4560
|
+
readonly playSessionId: string;
|
|
4561
|
+
readonly status: PlaySessionGameStatus;
|
|
4562
|
+
}>;
|
|
4563
|
+
heartbeat: (input: {
|
|
4564
|
+
playSessionId: string;
|
|
4565
|
+
}) => Promise<{
|
|
4566
|
+
readonly status: PlaySessionGameStatus;
|
|
4567
|
+
}>;
|
|
4568
|
+
end: (input: {
|
|
4569
|
+
playSessionId: string;
|
|
4570
|
+
}) => Promise<{
|
|
4571
|
+
readonly status: PlaySessionGameStatus;
|
|
4572
|
+
}>;
|
|
4573
|
+
};
|
|
4574
|
+
get wallets(): {
|
|
4575
|
+
list: (input: {
|
|
4576
|
+
bearer: string;
|
|
4577
|
+
}) => Promise<WalletListResponse>;
|
|
4578
|
+
};
|
|
4579
|
+
get inventory(): {
|
|
4580
|
+
list: (input: {
|
|
4581
|
+
bearer: string;
|
|
4582
|
+
}) => Promise<InventoryListResponse>;
|
|
4583
|
+
requestMint: (input: {
|
|
4584
|
+
body: MintRequestInput;
|
|
4585
|
+
}) => Promise<MintRequestResult>;
|
|
4586
|
+
};
|
|
4587
|
+
get friends(): {
|
|
4588
|
+
list: (input: {
|
|
4589
|
+
bearer: string;
|
|
4590
|
+
}) => Promise<AppFriendListResponse>;
|
|
4591
|
+
};
|
|
4592
|
+
get socials(): {
|
|
4593
|
+
list: (input: {
|
|
4594
|
+
bearer: string;
|
|
4595
|
+
}) => Promise<SocialListResponse>;
|
|
4596
|
+
};
|
|
4597
|
+
get referral(): {
|
|
4598
|
+
get: (input: {
|
|
4599
|
+
bearer: string;
|
|
4600
|
+
}) => Promise<ReferralOverview>;
|
|
4601
|
+
createCode: (input: {
|
|
4602
|
+
bearer: string;
|
|
4603
|
+
regenerate?: boolean;
|
|
4604
|
+
}) => Promise<ReferralCodeResponse>;
|
|
4605
|
+
bind: (input: {
|
|
4606
|
+
bearer: string;
|
|
4607
|
+
code: string;
|
|
4608
|
+
source?: "signup-url" | "manual-claim" | "cookie-restore";
|
|
4609
|
+
}) => Promise<ReferralBindResponse>;
|
|
4610
|
+
};
|
|
4611
|
+
}
|
|
4612
|
+
//#endregion
|
|
4613
|
+
export { AppTokenCache, AuthorizeUrl, type BrowserClientConfig, BuildAuthorizeUrlInput, ChargeResult, type FetchLike, GameHalfCredentials, HttpsGuardOptions, InflightDedup, InventoryUpdateEvent, type Logger, MountPresenceWidgetOptions, NOOP_RATE_LIMITER, type NodeClientConfig, OauthErrorCode, OauthInventoryEventsSubscriber, OauthInventoryEventsSubscriberLifecycle, OauthInventoryEventsSubscriberOptions, OauthPaymentEventsSubscriber, OauthPaymentEventsSubscriberLifecycle, OauthPaymentEventsSubscriberOptions, OauthPaymentWebhookBody, type OauthScope, PkcePair, PlaySessionGameStatus, PresenceStatus, PresenceWidgetHandle, RateLimitOptions, RateLimiter, RequestOptions, SERVER_RATE_LIMIT_MAX_MUTATING, SERVER_RATE_LIMIT_MAX_READ, SERVER_RATE_LIMIT_WINDOW_MS, type SdkBaseConfig, TRON_WS_CLOSE_CODES, type TokenSet, type TokenStore, TransportContext, TronError, TronNodeClient, TronOauthError, TronWsCloseCode, TronWsCloseError, VerifyWebhookFailure, VerifyWebhookInput, VerifyWebhookResult, VerifyWebhookSuccess, WEBHOOK_SIGNATURE_HEADER, WEBHOOK_TIMESTAMP_HEADER, acceptDeveloperInvite, addAdmin, addAppealBlacklist, addReaction, approveTronCashout, assertSecureIssuer, batchThreadDmKeys, bindReferral, buildAuthorizeUrl, cancelFriendRequest, cancelPot, charge, chargeTronDirect, chargeTronPot, commentOnGameReview, completePaymentIntent, confirmPlaySession, consolidateDeveloperAppWallet, createAppTokenCache, createConsoleLogger, createDelegation, createDeveloperApiKey, createDeveloperApp, createDeveloperAppMintPermit, createDeveloperVaultPermit, createDeveloperWithdrawPermit, createDirectThread, createInMemoryTokenStore, createInflightDedup, createNoopLogger, createRateLimiter, createReferralCode, createTronCashout, createTronConnectOnboarding, createTronDeposit, createTronTransfer, createTronTransferChallenge, decideFriendRequest, declineDeveloperInvite, defaultEndpoints, deleteAppPageBanner, deleteAppPageThumbnail, deleteAppPageThumbnailVideo, deleteAvatar, deleteDelegation, deleteDeveloperApp, deleteDeveloperAppLogo, deleteDeveloperProfileLogo, deleteDeveloperRequestLogo, deleteGameReviewComment, deleteGameReviewReply, deleteMessage, deleteMyGameReview, deleteThread, deleteThreadLogo, denyPaymentIntent, distributePot, distributeTronPot, editMessage, endPlaySession, exchangeAuthorizationCode, executeNftTransfer, fetchAuthorizationServerMetadata, fetchUserInfo, fileAppeal, fileAppealPotLeg, followUser, forceWithdrawVaultCustody, generatePkce, generateState, getActivity, getActivityGroup, getAdminAppealRoom, getAppFeeConfig, getAppPage, getAppPageChanges, getAppealRoom, getDelegation, getDeveloperAppActivity, getDeveloperAppBalances, getDeveloperAppEarnings, getDeveloperAppInventoryItemHolders, getDeveloperAppOverview, getDeveloperAppPage, getDeveloperAppPlaytime, getDeveloperAppTronBalance, getDeveloperAppWallets, getDeveloperPaymentAppeals, getDeveloperPaymentPendingDeposits, getDeveloperStatus, getDeveloperTronBalanceSummary, getDmKeyBackupStatus, getIntentStatus, getLibrary, getMoonpayAvailability, getMyDmKey, getMyGameReview, getMyGameReviewReactions, getOutstanding, getPaymentChains, getPaymentHistory, getPaymentIntent, getPaymentLimits, getPaymentPrice, getPlatformFees, getPlaytime, getPlaytimeTimeseries, getPublicProfile, getReferral, getThreadDmKey, getTronBalance, getTronGameBalance, getTronSecurity, heartbeatPlaySession, hideAppPage, hideThread, inventoryUpdateEventSchema, inviteDeveloperAppParticipant, inviteParticipants, leaveThread, listActivePlayers, listAdmins, listAppPages, listAppealBlacklist, listAppealQueue, listAudit, listDeveloperApiKeys, listDeveloperAppContentReports, listDeveloperAppInventoryCollections, listDeveloperAppInventoryItems, listDeveloperAppParticipants, listDeveloperAppReviews, listDeveloperInvites, listDeveloperRequests, listDevelopers, listFriends, listFriendsForApp, listGameReviewComments, listGameReviews, listInventory, listInventoryForApp, listInventoryMintPermits, listInventoryVaultPermits, listInventoryVaulted, listNotifications, listOauthInventoryVaulted, listPaymentAuthorizations, listSocials, listThreadMessages, listThreads, listTronCashoutQueue, listTronCashouts, listTronLedger, listUsers, listWalletManager, listWallets, markAllNotificationsRead, markThreadRead, mintClientCredentialsToken, mintMoonpayBuyUrl, mintMoonpaySellUrl, mountPresenceWidget, oauthPaymentWebhookBodySchema, parseJson, pinThread, postAdminAppealRoomMessage, postAppealRoomMessage, previewReferral, provisionDeveloperAppWallet, publishDmKey, quoteDeveloperAppInventoryRegistration, quoteNftTransfer, quoteRelayedVaultPermit, redeemInventoryMintPermit, refreshAccessToken, registerDeveloperAppInventoryItem, registerOauthClient, rejectTronCashout, removeAdmin, removeAppealBlacklist, removeFriend, removeParticipant, removeReaction, replyToGameReview, requestDeveloperAppProduction, requestMint, requestPayout, resolveAppeal, reviewAppPage, reviewAppPageChanges, reviewDeveloperRequest, revokeDeveloperApiKey, revokeDeveloperAppParticipant, revokePaymentAuthorization, revokeToken, rotateDeveloperAppKey, rotateDeveloperAppPaymentWebhookSecret, rotateProcessorTreasury, searchGiphy, searchUsers, send, sendFriendRequest, sendJson, sendMessage, sendPresenceHeartbeat, setMyGameReviewReaction, setProcessorWhitelist, setTronSecurity, setVaultOperator, setVaultPause, setVaultWithdrawLockDefault, setVaultWithdrawLockOverride, setupDmKeyBackup, sha256Base64Url, signInventoryVaultPermit, signPaymentIntent, startOauthInventoryEventsSubscriber, startOauthPaymentEventsSubscriber, submitAppContentReport, submitAppPageForReview, submitDeveloperRequest, submitRelayedVaultPermit, tipGameReview, toTokenSet, unfollowUser, unhideAppPage, unlockDmKeyBackup, unpinThread, unpublishAppPage, updateAdminRole, updateAppFeeConfig, updateAppPage, updateDeveloperApp, updateDeveloperAppAutoSweep, updateDeveloperAppContentReportStatus, updateDeveloperProfile, updateNotification, updateParticipantRole, updatePaymentAuthorization, updatePlatformFees, updateProfile, updateThreadSettings, updateUserBan, updateWalletLabel, uploadAdminAppealRoomAttachment, uploadAppPageBanner, uploadAppPageGallery, uploadAppPageThumbnail, uploadAppPageThumbnailVideo, uploadAppealRoomAttachment, uploadAttachment, uploadAvatar, uploadDeveloperAppInventoryItemBanner, uploadDeveloperAppInventoryItemImage, uploadDeveloperAppLogo, uploadDeveloperProfileLogo, uploadDeveloperRequestLogo, uploadMultipart, uploadThreadLogo, upsertMyGameReview, verifyWebhook, withdrawDeveloperAppWallet };
|