@tinyburg/treasury-sdk 0.0.0-stage → 0.2.0

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/dist/Sdk.d.ts ADDED
@@ -0,0 +1,1264 @@
1
+ /**
2
+ * The api the treasury serves: player-to-player trades, escrowed.
3
+ *
4
+ * Nimblebit has no hold primitive, so the treasury makes one out of the gift
5
+ * channel: each side's item is sent to a treasury-owned vault tower, where it
6
+ * sits as an *unreceived* gift - a native escrow slot - until both deposits
7
+ * are verified, and only then is each item forwarded to the other side. A
8
+ * save-splice trade instead rewrites both saves directly, which is why it
9
+ * requires an explicit confirmation from both parties before anything runs.
10
+ *
11
+ * Every endpoint but the public stats is bearer authenticated with a JWT
12
+ * access token the Tinyburg OAuth server issued for the Tinyburg api
13
+ * (`<site>/v1`), and guarded by a leaf of the `treasury` scope area in
14
+ * `Scopes`. The treasury lives behind tinyburg.app: the paths here are
15
+ * reached at `<site>/v1/treasury/*`, which tinyburg.app forwards verbatim,
16
+ * `Authorization` header included. The first-party app gets its token from
17
+ * tinyburg.app's `/auth/token`; any other application uses the one it was
18
+ * issued.
19
+ *
20
+ * A token without the endpoint's scope is refused with `403` and an
21
+ * `insufficient_scope` challenge. Any other `403` from a trade endpoint
22
+ * means the treasury holds no usable grant for the caller's towers;
23
+ * `GrantStatus` says so explicitly and carries the url that starts the
24
+ * connect flow.
25
+ *
26
+ * @since 1.0.0
27
+ */
28
+ import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
29
+ import * as Schema from "effect/Schema";
30
+ import * as OAuthScope from "@yielded/auth/OAuthScope";
31
+ /**
32
+ * How a trade moves its items. `gift` rides Nimblebit's gift channel through
33
+ * the vault; `splice` rewrites both saves and can carry what the gift channel
34
+ * cannot (costumes, pets, coins, bux).
35
+ *
36
+ * @since 1.0.0
37
+ * @category Schemas
38
+ */
39
+ export declare const TradeMechanism: Schema.Literals<readonly ["gift", "splice"]>;
40
+ /**
41
+ * The games the treasury trades in. TinyTower only, until the trading api
42
+ * serves more.
43
+ *
44
+ * @since 1.0.0
45
+ * @category Schemas
46
+ */
47
+ export declare const TradeGame: Schema.Literals<readonly ["tinytower"]>;
48
+ /**
49
+ * Where a trade is in its life. The happy path is `proposed` → `accepted` →
50
+ * (`awaiting_confirmation`, splice only) → `escrowing` → `escrowed` →
51
+ * `releasing` (gift) or `executing` (splice) → `settled`; everything else is
52
+ * one of the ways out.
53
+ *
54
+ * @since 1.0.0
55
+ * @category Schemas
56
+ */
57
+ export declare const TradeState: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
58
+ /**
59
+ * One side of a gift trade's journey through the vault: `pending` → `sent`
60
+ * (deposit dispatched) → `verified` (seen in the vault's gift queue) →
61
+ * `released` (forwarded to the counterparty) → `settled` (vault slot
62
+ * claimed); refunds run `refund_sent` → `refunded`, and `lost` is a deposit
63
+ * that never arrived.
64
+ *
65
+ * @since 1.0.0
66
+ * @category Schemas
67
+ */
68
+ export declare const LegState: Schema.Literals<readonly ["pending", "sent", "verified", "released", "settled", "refund_sent", "refunded", "lost"]>;
69
+ /**
70
+ * @since 1.0.0
71
+ * @category Schemas
72
+ */
73
+ export declare const TradeRole: Schema.Literals<readonly ["proposer", "counterparty"]>;
74
+ /**
75
+ * One item offered over the gift channel, in the encoded form the game
76
+ * exchanges items in - the same string `SendItem` carries.
77
+ *
78
+ * @since 1.0.0
79
+ * @category Schemas
80
+ */
81
+ export declare const GiftItem: Schema.Struct<{
82
+ readonly _tag: Schema.tag<"GiftItem">;
83
+ readonly itemType: Schema.Enum<{
84
+ readonly None: "None";
85
+ readonly Play: "Play";
86
+ readonly Gift: "Gift";
87
+ readonly Cloud: "Cloud";
88
+ readonly Raffle: "Raffle";
89
+ readonly Visit: "Visit";
90
+ readonly Leaderboards: "Leaderboards";
91
+ }>;
92
+ readonly item: Schema.String;
93
+ }>;
94
+ /**
95
+ * One item offered by splice. Bitizens, costumes and pets carry the encoded
96
+ * string a save stores them as; coins and bux carry an amount instead.
97
+ *
98
+ * @since 1.0.0
99
+ * @category Schemas
100
+ */
101
+ export declare const SpliceItem: Schema.Struct<{
102
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
103
+ readonly item: Schema.optional<Schema.String>;
104
+ readonly amount: Schema.optional<Schema.Int>;
105
+ }>;
106
+ /**
107
+ * @since 1.0.0
108
+ * @category Schemas
109
+ */
110
+ export declare const SpliceItems: Schema.Struct<{
111
+ readonly _tag: Schema.tag<"SpliceItems">;
112
+ readonly items: Schema.$Array<Schema.Struct<{
113
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
114
+ readonly item: Schema.optional<Schema.String>;
115
+ readonly amount: Schema.optional<Schema.Int>;
116
+ }>>;
117
+ }>;
118
+ /**
119
+ * What one side of a trade puts in: a gift-channel item or a list of splice
120
+ * items, matching the trade's mechanism.
121
+ *
122
+ * @since 1.0.0
123
+ * @category Schemas
124
+ */
125
+ export declare const ItemSpec: Schema.Union<readonly [Schema.Struct<{
126
+ readonly _tag: Schema.tag<"GiftItem">;
127
+ readonly itemType: Schema.Enum<{
128
+ readonly None: "None";
129
+ readonly Play: "Play";
130
+ readonly Gift: "Gift";
131
+ readonly Cloud: "Cloud";
132
+ readonly Raffle: "Raffle";
133
+ readonly Visit: "Visit";
134
+ readonly Leaderboards: "Leaderboards";
135
+ }>;
136
+ readonly item: Schema.String;
137
+ }>, Schema.Struct<{
138
+ readonly _tag: Schema.tag<"SpliceItems">;
139
+ readonly items: Schema.$Array<Schema.Struct<{
140
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
141
+ readonly item: Schema.optional<Schema.String>;
142
+ readonly amount: Schema.optional<Schema.Int>;
143
+ }>>;
144
+ }>]>;
145
+ /**
146
+ * A trade as the api describes it. `gives` and `wants` are always from the
147
+ * proposer's point of view; `role` is which side the caller is on, absent for
148
+ * an open offer the caller could accept.
149
+ *
150
+ * @since 1.0.0
151
+ * @category Schemas
152
+ */
153
+ export declare const Trade: Schema.Struct<{
154
+ readonly id: Schema.String;
155
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
156
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
157
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
158
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
159
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
160
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
161
+ readonly _tag: Schema.tag<"GiftItem">;
162
+ readonly itemType: Schema.Enum<{
163
+ readonly None: "None";
164
+ readonly Play: "Play";
165
+ readonly Gift: "Gift";
166
+ readonly Cloud: "Cloud";
167
+ readonly Raffle: "Raffle";
168
+ readonly Visit: "Visit";
169
+ readonly Leaderboards: "Leaderboards";
170
+ }>;
171
+ readonly item: Schema.String;
172
+ }>, Schema.Struct<{
173
+ readonly _tag: Schema.tag<"SpliceItems">;
174
+ readonly items: Schema.$Array<Schema.Struct<{
175
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
176
+ readonly item: Schema.optional<Schema.String>;
177
+ readonly amount: Schema.optional<Schema.Int>;
178
+ }>>;
179
+ }>]>;
180
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
181
+ readonly _tag: Schema.tag<"GiftItem">;
182
+ readonly itemType: Schema.Enum<{
183
+ readonly None: "None";
184
+ readonly Play: "Play";
185
+ readonly Gift: "Gift";
186
+ readonly Cloud: "Cloud";
187
+ readonly Raffle: "Raffle";
188
+ readonly Visit: "Visit";
189
+ readonly Leaderboards: "Leaderboards";
190
+ }>;
191
+ readonly item: Schema.String;
192
+ }>, Schema.Struct<{
193
+ readonly _tag: Schema.tag<"SpliceItems">;
194
+ readonly items: Schema.$Array<Schema.Struct<{
195
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
196
+ readonly item: Schema.optional<Schema.String>;
197
+ readonly amount: Schema.optional<Schema.Int>;
198
+ }>>;
199
+ }>]>;
200
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
201
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
202
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
203
+ readonly createdAt: Schema.DateTimeUtcFromString;
204
+ readonly expiresAt: Schema.DateTimeUtcFromString;
205
+ readonly failureReason: Schema.optional<Schema.String>;
206
+ }>;
207
+ /**
208
+ * @since 1.0.0
209
+ * @category Schemas
210
+ */
211
+ export declare const TradeLeg: Schema.Struct<{
212
+ readonly role: Schema.Literals<readonly ["proposer", "counterparty"]>;
213
+ readonly fromPlayerId: Schema.brand<Schema.String, "PlayerId">;
214
+ readonly toPlayerId: Schema.brand<Schema.String, "PlayerId">;
215
+ readonly state: Schema.Literals<readonly ["pending", "sent", "verified", "released", "settled", "refund_sent", "refunded", "lost"]>;
216
+ readonly itemType: Schema.Enum<{
217
+ readonly None: "None";
218
+ readonly Play: "Play";
219
+ readonly Gift: "Gift";
220
+ readonly Cloud: "Cloud";
221
+ readonly Raffle: "Raffle";
222
+ readonly Visit: "Visit";
223
+ readonly Leaderboards: "Leaderboards";
224
+ }>;
225
+ readonly item: Schema.String;
226
+ }>;
227
+ /**
228
+ * One entry of a trade's append-only history, as shown on its timeline.
229
+ *
230
+ * @since 1.0.0
231
+ * @category Schemas
232
+ */
233
+ export declare const LedgerEvent: Schema.Struct<{
234
+ readonly event: Schema.String;
235
+ readonly at: Schema.DateTimeUtcFromString;
236
+ }>;
237
+ /**
238
+ * A trade with its legs and its history, for the participants only.
239
+ *
240
+ * @since 1.0.0
241
+ * @category Schemas
242
+ */
243
+ export declare const TradeDetail: Schema.Struct<{
244
+ readonly trade: Schema.Struct<{
245
+ readonly id: Schema.String;
246
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
247
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
248
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
249
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
250
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
251
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
252
+ readonly _tag: Schema.tag<"GiftItem">;
253
+ readonly itemType: Schema.Enum<{
254
+ readonly None: "None";
255
+ readonly Play: "Play";
256
+ readonly Gift: "Gift";
257
+ readonly Cloud: "Cloud";
258
+ readonly Raffle: "Raffle";
259
+ readonly Visit: "Visit";
260
+ readonly Leaderboards: "Leaderboards";
261
+ }>;
262
+ readonly item: Schema.String;
263
+ }>, Schema.Struct<{
264
+ readonly _tag: Schema.tag<"SpliceItems">;
265
+ readonly items: Schema.$Array<Schema.Struct<{
266
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
267
+ readonly item: Schema.optional<Schema.String>;
268
+ readonly amount: Schema.optional<Schema.Int>;
269
+ }>>;
270
+ }>]>;
271
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
272
+ readonly _tag: Schema.tag<"GiftItem">;
273
+ readonly itemType: Schema.Enum<{
274
+ readonly None: "None";
275
+ readonly Play: "Play";
276
+ readonly Gift: "Gift";
277
+ readonly Cloud: "Cloud";
278
+ readonly Raffle: "Raffle";
279
+ readonly Visit: "Visit";
280
+ readonly Leaderboards: "Leaderboards";
281
+ }>;
282
+ readonly item: Schema.String;
283
+ }>, Schema.Struct<{
284
+ readonly _tag: Schema.tag<"SpliceItems">;
285
+ readonly items: Schema.$Array<Schema.Struct<{
286
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
287
+ readonly item: Schema.optional<Schema.String>;
288
+ readonly amount: Schema.optional<Schema.Int>;
289
+ }>>;
290
+ }>]>;
291
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
292
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
293
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
294
+ readonly createdAt: Schema.DateTimeUtcFromString;
295
+ readonly expiresAt: Schema.DateTimeUtcFromString;
296
+ readonly failureReason: Schema.optional<Schema.String>;
297
+ }>;
298
+ readonly legs: Schema.$Array<Schema.Struct<{
299
+ readonly role: Schema.Literals<readonly ["proposer", "counterparty"]>;
300
+ readonly fromPlayerId: Schema.brand<Schema.String, "PlayerId">;
301
+ readonly toPlayerId: Schema.brand<Schema.String, "PlayerId">;
302
+ readonly state: Schema.Literals<readonly ["pending", "sent", "verified", "released", "settled", "refund_sent", "refunded", "lost"]>;
303
+ readonly itemType: Schema.Enum<{
304
+ readonly None: "None";
305
+ readonly Play: "Play";
306
+ readonly Gift: "Gift";
307
+ readonly Cloud: "Cloud";
308
+ readonly Raffle: "Raffle";
309
+ readonly Visit: "Visit";
310
+ readonly Leaderboards: "Leaderboards";
311
+ }>;
312
+ readonly item: Schema.String;
313
+ }>>;
314
+ readonly ledger: Schema.$Array<Schema.Struct<{
315
+ readonly event: Schema.String;
316
+ readonly at: Schema.DateTimeUtcFromString;
317
+ }>>;
318
+ }>;
319
+ /**
320
+ * Whether the treasury can currently act on the caller's towers, and where
321
+ * to go to make it so. The url is built server-side so the browser stays
322
+ * configuration-free.
323
+ *
324
+ * @since 1.0.0
325
+ * @category Schemas
326
+ */
327
+ export declare const GrantStatus: Schema.Struct<{
328
+ readonly connected: Schema.Boolean;
329
+ readonly scope: Schema.optional<Schema.String>;
330
+ readonly connectUrl: Schema.String;
331
+ }>;
332
+ /**
333
+ * What a tower could put into a trade, read out of its save. Bitizens are the
334
+ * encoded strings the gift channel carries; costumes and pets are the strings
335
+ * the save stores.
336
+ *
337
+ * @since 1.0.0
338
+ * @category Schemas
339
+ */
340
+ export declare const Inventory: Schema.Struct<{
341
+ readonly playerId: Schema.brand<Schema.String, "PlayerId">;
342
+ readonly bitizens: Schema.$Array<Schema.String>;
343
+ readonly costumes: Schema.$Array<Schema.String>;
344
+ readonly pets: Schema.$Array<Schema.String>;
345
+ readonly coins: Schema.Int;
346
+ readonly bux: Schema.Int;
347
+ }>;
348
+ /**
349
+ * The treasury's public counters, for the home page's stat tiles. Counts
350
+ * only, cached server-side, and deliberately free of anything per-user.
351
+ *
352
+ * @since 1.0.0
353
+ * @category Schemas
354
+ */
355
+ export declare const TreasuryStats: Schema.Struct<{
356
+ readonly activeTraders: Schema.Int;
357
+ readonly settledTrades: Schema.Int;
358
+ readonly itemsMoved: Schema.Int;
359
+ }>;
360
+ /**
361
+ * @since 1.0.0
362
+ * @category Schemas
363
+ */
364
+ export declare const TradeProposal: Schema.Struct<{
365
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
366
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
367
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
368
+ /** Absent for an open offer, which whoever accepts first gets. */
369
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
370
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
371
+ readonly _tag: Schema.tag<"GiftItem">;
372
+ readonly itemType: Schema.Enum<{
373
+ readonly None: "None";
374
+ readonly Play: "Play";
375
+ readonly Gift: "Gift";
376
+ readonly Cloud: "Cloud";
377
+ readonly Raffle: "Raffle";
378
+ readonly Visit: "Visit";
379
+ readonly Leaderboards: "Leaderboards";
380
+ }>;
381
+ readonly item: Schema.String;
382
+ }>, Schema.Struct<{
383
+ readonly _tag: Schema.tag<"SpliceItems">;
384
+ readonly items: Schema.$Array<Schema.Struct<{
385
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
386
+ readonly item: Schema.optional<Schema.String>;
387
+ readonly amount: Schema.optional<Schema.Int>;
388
+ }>>;
389
+ }>]>;
390
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
391
+ readonly _tag: Schema.tag<"GiftItem">;
392
+ readonly itemType: Schema.Enum<{
393
+ readonly None: "None";
394
+ readonly Play: "Play";
395
+ readonly Gift: "Gift";
396
+ readonly Cloud: "Cloud";
397
+ readonly Raffle: "Raffle";
398
+ readonly Visit: "Visit";
399
+ readonly Leaderboards: "Leaderboards";
400
+ }>;
401
+ readonly item: Schema.String;
402
+ }>, Schema.Struct<{
403
+ readonly _tag: Schema.tag<"SpliceItems">;
404
+ readonly items: Schema.$Array<Schema.Struct<{
405
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
406
+ readonly item: Schema.optional<Schema.String>;
407
+ readonly amount: Schema.optional<Schema.Int>;
408
+ }>>;
409
+ }>]>;
410
+ readonly ttlHours: Schema.Int;
411
+ }>;
412
+ /**
413
+ * Everything the treasury serves. The group annotation is the floor: an
414
+ * endpoint added later without its own leaf accepts only the whole
415
+ * `treasury` scope, so nothing defaults to a weaker permission.
416
+ *
417
+ * @since 1.0.0
418
+ * @category Groups
419
+ */
420
+ export declare const TreasuryGroup: HttpApiGroup.HttpApiGroup<"TreasuryGroup", HttpApiEndpoint.HttpApiEndpoint<"GrantStatus", "GET", "/v1/treasury/grant", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
421
+ readonly connected: Schema.Boolean;
422
+ readonly scope: Schema.optional<Schema.String>;
423
+ readonly connectUrl: Schema.String;
424
+ }>>, never, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ListInventory", "GET", "/v1/treasury/inventory/:playerId", Schema.toCodecStringTree<Schema.Struct<{
425
+ playerId: Schema.brand<Schema.String, "PlayerId">;
426
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
427
+ readonly playerId: Schema.brand<Schema.String, "PlayerId">;
428
+ readonly bitizens: Schema.$Array<Schema.String>;
429
+ readonly costumes: Schema.$Array<Schema.String>;
430
+ readonly pets: Schema.$Array<Schema.String>;
431
+ readonly coins: Schema.Int;
432
+ readonly bux: Schema.Int;
433
+ }>>, Schema.toCodecJson<typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.ServiceUnavailable>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ListTrades", "GET", "/v1/treasury/trades", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
434
+ readonly id: Schema.String;
435
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
436
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
437
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
438
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
439
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
440
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
441
+ readonly _tag: Schema.tag<"GiftItem">;
442
+ readonly itemType: Schema.Enum<{
443
+ readonly None: "None";
444
+ readonly Play: "Play";
445
+ readonly Gift: "Gift";
446
+ readonly Cloud: "Cloud";
447
+ readonly Raffle: "Raffle";
448
+ readonly Visit: "Visit";
449
+ readonly Leaderboards: "Leaderboards";
450
+ }>;
451
+ readonly item: Schema.String;
452
+ }>, Schema.Struct<{
453
+ readonly _tag: Schema.tag<"SpliceItems">;
454
+ readonly items: Schema.$Array<Schema.Struct<{
455
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
456
+ readonly item: Schema.optional<Schema.String>;
457
+ readonly amount: Schema.optional<Schema.Int>;
458
+ }>>;
459
+ }>]>;
460
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
461
+ readonly _tag: Schema.tag<"GiftItem">;
462
+ readonly itemType: Schema.Enum<{
463
+ readonly None: "None";
464
+ readonly Play: "Play";
465
+ readonly Gift: "Gift";
466
+ readonly Cloud: "Cloud";
467
+ readonly Raffle: "Raffle";
468
+ readonly Visit: "Visit";
469
+ readonly Leaderboards: "Leaderboards";
470
+ }>;
471
+ readonly item: Schema.String;
472
+ }>, Schema.Struct<{
473
+ readonly _tag: Schema.tag<"SpliceItems">;
474
+ readonly items: Schema.$Array<Schema.Struct<{
475
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
476
+ readonly item: Schema.optional<Schema.String>;
477
+ readonly amount: Schema.optional<Schema.Int>;
478
+ }>>;
479
+ }>]>;
480
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
481
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
482
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
483
+ readonly createdAt: Schema.DateTimeUtcFromString;
484
+ readonly expiresAt: Schema.DateTimeUtcFromString;
485
+ readonly failureReason: Schema.optional<Schema.String>;
486
+ }>>>, never, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ProposeTrade", "POST", "/v1/treasury/trades", never, never, Schema.toCodecJson<Schema.Struct<{
487
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
488
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
489
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
490
+ /** Absent for an open offer, which whoever accepts first gets. */
491
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
492
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
493
+ readonly _tag: Schema.tag<"GiftItem">;
494
+ readonly itemType: Schema.Enum<{
495
+ readonly None: "None";
496
+ readonly Play: "Play";
497
+ readonly Gift: "Gift";
498
+ readonly Cloud: "Cloud";
499
+ readonly Raffle: "Raffle";
500
+ readonly Visit: "Visit";
501
+ readonly Leaderboards: "Leaderboards";
502
+ }>;
503
+ readonly item: Schema.String;
504
+ }>, Schema.Struct<{
505
+ readonly _tag: Schema.tag<"SpliceItems">;
506
+ readonly items: Schema.$Array<Schema.Struct<{
507
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
508
+ readonly item: Schema.optional<Schema.String>;
509
+ readonly amount: Schema.optional<Schema.Int>;
510
+ }>>;
511
+ }>]>;
512
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
513
+ readonly _tag: Schema.tag<"GiftItem">;
514
+ readonly itemType: Schema.Enum<{
515
+ readonly None: "None";
516
+ readonly Play: "Play";
517
+ readonly Gift: "Gift";
518
+ readonly Cloud: "Cloud";
519
+ readonly Raffle: "Raffle";
520
+ readonly Visit: "Visit";
521
+ readonly Leaderboards: "Leaderboards";
522
+ }>;
523
+ readonly item: Schema.String;
524
+ }>, Schema.Struct<{
525
+ readonly _tag: Schema.tag<"SpliceItems">;
526
+ readonly items: Schema.$Array<Schema.Struct<{
527
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
528
+ readonly item: Schema.optional<Schema.String>;
529
+ readonly amount: Schema.optional<Schema.Int>;
530
+ }>>;
531
+ }>]>;
532
+ readonly ttlHours: Schema.Int;
533
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
534
+ readonly id: Schema.String;
535
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
536
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
537
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
538
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
539
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
540
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
541
+ readonly _tag: Schema.tag<"GiftItem">;
542
+ readonly itemType: Schema.Enum<{
543
+ readonly None: "None";
544
+ readonly Play: "Play";
545
+ readonly Gift: "Gift";
546
+ readonly Cloud: "Cloud";
547
+ readonly Raffle: "Raffle";
548
+ readonly Visit: "Visit";
549
+ readonly Leaderboards: "Leaderboards";
550
+ }>;
551
+ readonly item: Schema.String;
552
+ }>, Schema.Struct<{
553
+ readonly _tag: Schema.tag<"SpliceItems">;
554
+ readonly items: Schema.$Array<Schema.Struct<{
555
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
556
+ readonly item: Schema.optional<Schema.String>;
557
+ readonly amount: Schema.optional<Schema.Int>;
558
+ }>>;
559
+ }>]>;
560
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
561
+ readonly _tag: Schema.tag<"GiftItem">;
562
+ readonly itemType: Schema.Enum<{
563
+ readonly None: "None";
564
+ readonly Play: "Play";
565
+ readonly Gift: "Gift";
566
+ readonly Cloud: "Cloud";
567
+ readonly Raffle: "Raffle";
568
+ readonly Visit: "Visit";
569
+ readonly Leaderboards: "Leaderboards";
570
+ }>;
571
+ readonly item: Schema.String;
572
+ }>, Schema.Struct<{
573
+ readonly _tag: Schema.tag<"SpliceItems">;
574
+ readonly items: Schema.$Array<Schema.Struct<{
575
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
576
+ readonly item: Schema.optional<Schema.String>;
577
+ readonly amount: Schema.optional<Schema.Int>;
578
+ }>>;
579
+ }>]>;
580
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
581
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
582
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
583
+ readonly createdAt: Schema.DateTimeUtcFromString;
584
+ readonly expiresAt: Schema.DateTimeUtcFromString;
585
+ readonly failureReason: Schema.optional<Schema.String>;
586
+ }>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Forbidden | typeof HttpApiError.ServiceUnavailable>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"GetTrade", "GET", "/v1/treasury/trades/:tradeId", Schema.toCodecStringTree<Schema.Struct<{
587
+ tradeId: Schema.String;
588
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
589
+ readonly trade: Schema.Struct<{
590
+ readonly id: Schema.String;
591
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
592
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
593
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
594
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
595
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
596
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
597
+ readonly _tag: Schema.tag<"GiftItem">;
598
+ readonly itemType: Schema.Enum<{
599
+ readonly None: "None";
600
+ readonly Play: "Play";
601
+ readonly Gift: "Gift";
602
+ readonly Cloud: "Cloud";
603
+ readonly Raffle: "Raffle";
604
+ readonly Visit: "Visit";
605
+ readonly Leaderboards: "Leaderboards";
606
+ }>;
607
+ readonly item: Schema.String;
608
+ }>, Schema.Struct<{
609
+ readonly _tag: Schema.tag<"SpliceItems">;
610
+ readonly items: Schema.$Array<Schema.Struct<{
611
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
612
+ readonly item: Schema.optional<Schema.String>;
613
+ readonly amount: Schema.optional<Schema.Int>;
614
+ }>>;
615
+ }>]>;
616
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
617
+ readonly _tag: Schema.tag<"GiftItem">;
618
+ readonly itemType: Schema.Enum<{
619
+ readonly None: "None";
620
+ readonly Play: "Play";
621
+ readonly Gift: "Gift";
622
+ readonly Cloud: "Cloud";
623
+ readonly Raffle: "Raffle";
624
+ readonly Visit: "Visit";
625
+ readonly Leaderboards: "Leaderboards";
626
+ }>;
627
+ readonly item: Schema.String;
628
+ }>, Schema.Struct<{
629
+ readonly _tag: Schema.tag<"SpliceItems">;
630
+ readonly items: Schema.$Array<Schema.Struct<{
631
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
632
+ readonly item: Schema.optional<Schema.String>;
633
+ readonly amount: Schema.optional<Schema.Int>;
634
+ }>>;
635
+ }>]>;
636
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
637
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
638
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
639
+ readonly createdAt: Schema.DateTimeUtcFromString;
640
+ readonly expiresAt: Schema.DateTimeUtcFromString;
641
+ readonly failureReason: Schema.optional<Schema.String>;
642
+ }>;
643
+ readonly legs: Schema.$Array<Schema.Struct<{
644
+ readonly role: Schema.Literals<readonly ["proposer", "counterparty"]>;
645
+ readonly fromPlayerId: Schema.brand<Schema.String, "PlayerId">;
646
+ readonly toPlayerId: Schema.brand<Schema.String, "PlayerId">;
647
+ readonly state: Schema.Literals<readonly ["pending", "sent", "verified", "released", "settled", "refund_sent", "refunded", "lost"]>;
648
+ readonly itemType: Schema.Enum<{
649
+ readonly None: "None";
650
+ readonly Play: "Play";
651
+ readonly Gift: "Gift";
652
+ readonly Cloud: "Cloud";
653
+ readonly Raffle: "Raffle";
654
+ readonly Visit: "Visit";
655
+ readonly Leaderboards: "Leaderboards";
656
+ }>;
657
+ readonly item: Schema.String;
658
+ }>>;
659
+ readonly ledger: Schema.$Array<Schema.Struct<{
660
+ readonly event: Schema.String;
661
+ readonly at: Schema.DateTimeUtcFromString;
662
+ }>>;
663
+ }>>, Schema.toCodecJson<typeof HttpApiError.NotFound>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"AcceptTrade", "POST", "/v1/treasury/trades/:tradeId/accept", Schema.toCodecStringTree<Schema.Struct<{
664
+ tradeId: Schema.String;
665
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
666
+ readonly playerId: Schema.brand<Schema.String, "PlayerId">;
667
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
668
+ readonly id: Schema.String;
669
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
670
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
671
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
672
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
673
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
674
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
675
+ readonly _tag: Schema.tag<"GiftItem">;
676
+ readonly itemType: Schema.Enum<{
677
+ readonly None: "None";
678
+ readonly Play: "Play";
679
+ readonly Gift: "Gift";
680
+ readonly Cloud: "Cloud";
681
+ readonly Raffle: "Raffle";
682
+ readonly Visit: "Visit";
683
+ readonly Leaderboards: "Leaderboards";
684
+ }>;
685
+ readonly item: Schema.String;
686
+ }>, Schema.Struct<{
687
+ readonly _tag: Schema.tag<"SpliceItems">;
688
+ readonly items: Schema.$Array<Schema.Struct<{
689
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
690
+ readonly item: Schema.optional<Schema.String>;
691
+ readonly amount: Schema.optional<Schema.Int>;
692
+ }>>;
693
+ }>]>;
694
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
695
+ readonly _tag: Schema.tag<"GiftItem">;
696
+ readonly itemType: Schema.Enum<{
697
+ readonly None: "None";
698
+ readonly Play: "Play";
699
+ readonly Gift: "Gift";
700
+ readonly Cloud: "Cloud";
701
+ readonly Raffle: "Raffle";
702
+ readonly Visit: "Visit";
703
+ readonly Leaderboards: "Leaderboards";
704
+ }>;
705
+ readonly item: Schema.String;
706
+ }>, Schema.Struct<{
707
+ readonly _tag: Schema.tag<"SpliceItems">;
708
+ readonly items: Schema.$Array<Schema.Struct<{
709
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
710
+ readonly item: Schema.optional<Schema.String>;
711
+ readonly amount: Schema.optional<Schema.Int>;
712
+ }>>;
713
+ }>]>;
714
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
715
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
716
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
717
+ readonly createdAt: Schema.DateTimeUtcFromString;
718
+ readonly expiresAt: Schema.DateTimeUtcFromString;
719
+ readonly failureReason: Schema.optional<Schema.String>;
720
+ }>>, Schema.toCodecJson<typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.Conflict | typeof HttpApiError.ServiceUnavailable>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"CancelTrade", "POST", "/v1/treasury/trades/:tradeId/cancel", Schema.toCodecStringTree<Schema.Struct<{
721
+ tradeId: Schema.String;
722
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
723
+ readonly id: Schema.String;
724
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
725
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
726
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
727
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
728
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
729
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
730
+ readonly _tag: Schema.tag<"GiftItem">;
731
+ readonly itemType: Schema.Enum<{
732
+ readonly None: "None";
733
+ readonly Play: "Play";
734
+ readonly Gift: "Gift";
735
+ readonly Cloud: "Cloud";
736
+ readonly Raffle: "Raffle";
737
+ readonly Visit: "Visit";
738
+ readonly Leaderboards: "Leaderboards";
739
+ }>;
740
+ readonly item: Schema.String;
741
+ }>, Schema.Struct<{
742
+ readonly _tag: Schema.tag<"SpliceItems">;
743
+ readonly items: Schema.$Array<Schema.Struct<{
744
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
745
+ readonly item: Schema.optional<Schema.String>;
746
+ readonly amount: Schema.optional<Schema.Int>;
747
+ }>>;
748
+ }>]>;
749
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
750
+ readonly _tag: Schema.tag<"GiftItem">;
751
+ readonly itemType: Schema.Enum<{
752
+ readonly None: "None";
753
+ readonly Play: "Play";
754
+ readonly Gift: "Gift";
755
+ readonly Cloud: "Cloud";
756
+ readonly Raffle: "Raffle";
757
+ readonly Visit: "Visit";
758
+ readonly Leaderboards: "Leaderboards";
759
+ }>;
760
+ readonly item: Schema.String;
761
+ }>, Schema.Struct<{
762
+ readonly _tag: Schema.tag<"SpliceItems">;
763
+ readonly items: Schema.$Array<Schema.Struct<{
764
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
765
+ readonly item: Schema.optional<Schema.String>;
766
+ readonly amount: Schema.optional<Schema.Int>;
767
+ }>>;
768
+ }>]>;
769
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
770
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
771
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
772
+ readonly createdAt: Schema.DateTimeUtcFromString;
773
+ readonly expiresAt: Schema.DateTimeUtcFromString;
774
+ readonly failureReason: Schema.optional<Schema.String>;
775
+ }>>, Schema.toCodecJson<typeof HttpApiError.NotFound | typeof HttpApiError.Conflict>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ConfirmSplice", "POST", "/v1/treasury/trades/:tradeId/confirm", Schema.toCodecStringTree<Schema.Struct<{
776
+ tradeId: Schema.String;
777
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
778
+ readonly id: Schema.String;
779
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
780
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
781
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
782
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
783
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
784
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
785
+ readonly _tag: Schema.tag<"GiftItem">;
786
+ readonly itemType: Schema.Enum<{
787
+ readonly None: "None";
788
+ readonly Play: "Play";
789
+ readonly Gift: "Gift";
790
+ readonly Cloud: "Cloud";
791
+ readonly Raffle: "Raffle";
792
+ readonly Visit: "Visit";
793
+ readonly Leaderboards: "Leaderboards";
794
+ }>;
795
+ readonly item: Schema.String;
796
+ }>, Schema.Struct<{
797
+ readonly _tag: Schema.tag<"SpliceItems">;
798
+ readonly items: Schema.$Array<Schema.Struct<{
799
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
800
+ readonly item: Schema.optional<Schema.String>;
801
+ readonly amount: Schema.optional<Schema.Int>;
802
+ }>>;
803
+ }>]>;
804
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
805
+ readonly _tag: Schema.tag<"GiftItem">;
806
+ readonly itemType: Schema.Enum<{
807
+ readonly None: "None";
808
+ readonly Play: "Play";
809
+ readonly Gift: "Gift";
810
+ readonly Cloud: "Cloud";
811
+ readonly Raffle: "Raffle";
812
+ readonly Visit: "Visit";
813
+ readonly Leaderboards: "Leaderboards";
814
+ }>;
815
+ readonly item: Schema.String;
816
+ }>, Schema.Struct<{
817
+ readonly _tag: Schema.tag<"SpliceItems">;
818
+ readonly items: Schema.$Array<Schema.Struct<{
819
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
820
+ readonly item: Schema.optional<Schema.String>;
821
+ readonly amount: Schema.optional<Schema.Int>;
822
+ }>>;
823
+ }>]>;
824
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
825
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
826
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
827
+ readonly createdAt: Schema.DateTimeUtcFromString;
828
+ readonly expiresAt: Schema.DateTimeUtcFromString;
829
+ readonly failureReason: Schema.optional<Schema.String>;
830
+ }>>, Schema.toCodecJson<typeof HttpApiError.NotFound | typeof HttpApiError.Conflict>, OAuthScope.RequireAccess, never>, false>;
831
+ /**
832
+ * What the treasury tells anyone at all: the stat counters the home page
833
+ * shows. The one group without `RequireAccess` or a scope requirement, and
834
+ * it must stay that way - the home page is public, so this rides
835
+ * tinyburg.app's proxy without a token behind it.
836
+ *
837
+ * @since 1.0.0
838
+ * @category Groups
839
+ */
840
+ export declare const TreasuryPublicGroup: HttpApiGroup.HttpApiGroup<"TreasuryPublicGroup", HttpApiEndpoint.HttpApiEndpoint<"Stats", "GET", "/v1/treasury/stats", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
841
+ readonly activeTraders: Schema.Int;
842
+ readonly settledTrades: Schema.Int;
843
+ readonly itemsMoved: Schema.Int;
844
+ }>>, never, never, never>, false>;
845
+ /**
846
+ * @since 1.0.0
847
+ * @category Api
848
+ */
849
+ export declare const Api: HttpApi.HttpApi<"TreasurySdk", HttpApiGroup.HttpApiGroup<"TreasuryGroup", HttpApiEndpoint.HttpApiEndpoint<"GrantStatus", "GET", "/v1/treasury/grant", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
850
+ readonly connected: Schema.Boolean;
851
+ readonly scope: Schema.optional<Schema.String>;
852
+ readonly connectUrl: Schema.String;
853
+ }>>, never, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ListInventory", "GET", "/v1/treasury/inventory/:playerId", Schema.toCodecStringTree<Schema.Struct<{
854
+ playerId: Schema.brand<Schema.String, "PlayerId">;
855
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
856
+ readonly playerId: Schema.brand<Schema.String, "PlayerId">;
857
+ readonly bitizens: Schema.$Array<Schema.String>;
858
+ readonly costumes: Schema.$Array<Schema.String>;
859
+ readonly pets: Schema.$Array<Schema.String>;
860
+ readonly coins: Schema.Int;
861
+ readonly bux: Schema.Int;
862
+ }>>, Schema.toCodecJson<typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.ServiceUnavailable>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ListTrades", "GET", "/v1/treasury/trades", never, never, never, never, Schema.toCodecJson<Schema.$Array<Schema.Struct<{
863
+ readonly id: Schema.String;
864
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
865
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
866
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
867
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
868
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
869
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
870
+ readonly _tag: Schema.tag<"GiftItem">;
871
+ readonly itemType: Schema.Enum<{
872
+ readonly None: "None";
873
+ readonly Play: "Play";
874
+ readonly Gift: "Gift";
875
+ readonly Cloud: "Cloud";
876
+ readonly Raffle: "Raffle";
877
+ readonly Visit: "Visit";
878
+ readonly Leaderboards: "Leaderboards";
879
+ }>;
880
+ readonly item: Schema.String;
881
+ }>, Schema.Struct<{
882
+ readonly _tag: Schema.tag<"SpliceItems">;
883
+ readonly items: Schema.$Array<Schema.Struct<{
884
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
885
+ readonly item: Schema.optional<Schema.String>;
886
+ readonly amount: Schema.optional<Schema.Int>;
887
+ }>>;
888
+ }>]>;
889
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
890
+ readonly _tag: Schema.tag<"GiftItem">;
891
+ readonly itemType: Schema.Enum<{
892
+ readonly None: "None";
893
+ readonly Play: "Play";
894
+ readonly Gift: "Gift";
895
+ readonly Cloud: "Cloud";
896
+ readonly Raffle: "Raffle";
897
+ readonly Visit: "Visit";
898
+ readonly Leaderboards: "Leaderboards";
899
+ }>;
900
+ readonly item: Schema.String;
901
+ }>, Schema.Struct<{
902
+ readonly _tag: Schema.tag<"SpliceItems">;
903
+ readonly items: Schema.$Array<Schema.Struct<{
904
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
905
+ readonly item: Schema.optional<Schema.String>;
906
+ readonly amount: Schema.optional<Schema.Int>;
907
+ }>>;
908
+ }>]>;
909
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
910
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
911
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
912
+ readonly createdAt: Schema.DateTimeUtcFromString;
913
+ readonly expiresAt: Schema.DateTimeUtcFromString;
914
+ readonly failureReason: Schema.optional<Schema.String>;
915
+ }>>>, never, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ProposeTrade", "POST", "/v1/treasury/trades", never, never, Schema.toCodecJson<Schema.Struct<{
916
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
917
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
918
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
919
+ /** Absent for an open offer, which whoever accepts first gets. */
920
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
921
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
922
+ readonly _tag: Schema.tag<"GiftItem">;
923
+ readonly itemType: Schema.Enum<{
924
+ readonly None: "None";
925
+ readonly Play: "Play";
926
+ readonly Gift: "Gift";
927
+ readonly Cloud: "Cloud";
928
+ readonly Raffle: "Raffle";
929
+ readonly Visit: "Visit";
930
+ readonly Leaderboards: "Leaderboards";
931
+ }>;
932
+ readonly item: Schema.String;
933
+ }>, Schema.Struct<{
934
+ readonly _tag: Schema.tag<"SpliceItems">;
935
+ readonly items: Schema.$Array<Schema.Struct<{
936
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
937
+ readonly item: Schema.optional<Schema.String>;
938
+ readonly amount: Schema.optional<Schema.Int>;
939
+ }>>;
940
+ }>]>;
941
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
942
+ readonly _tag: Schema.tag<"GiftItem">;
943
+ readonly itemType: Schema.Enum<{
944
+ readonly None: "None";
945
+ readonly Play: "Play";
946
+ readonly Gift: "Gift";
947
+ readonly Cloud: "Cloud";
948
+ readonly Raffle: "Raffle";
949
+ readonly Visit: "Visit";
950
+ readonly Leaderboards: "Leaderboards";
951
+ }>;
952
+ readonly item: Schema.String;
953
+ }>, Schema.Struct<{
954
+ readonly _tag: Schema.tag<"SpliceItems">;
955
+ readonly items: Schema.$Array<Schema.Struct<{
956
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
957
+ readonly item: Schema.optional<Schema.String>;
958
+ readonly amount: Schema.optional<Schema.Int>;
959
+ }>>;
960
+ }>]>;
961
+ readonly ttlHours: Schema.Int;
962
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
963
+ readonly id: Schema.String;
964
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
965
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
966
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
967
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
968
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
969
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
970
+ readonly _tag: Schema.tag<"GiftItem">;
971
+ readonly itemType: Schema.Enum<{
972
+ readonly None: "None";
973
+ readonly Play: "Play";
974
+ readonly Gift: "Gift";
975
+ readonly Cloud: "Cloud";
976
+ readonly Raffle: "Raffle";
977
+ readonly Visit: "Visit";
978
+ readonly Leaderboards: "Leaderboards";
979
+ }>;
980
+ readonly item: Schema.String;
981
+ }>, Schema.Struct<{
982
+ readonly _tag: Schema.tag<"SpliceItems">;
983
+ readonly items: Schema.$Array<Schema.Struct<{
984
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
985
+ readonly item: Schema.optional<Schema.String>;
986
+ readonly amount: Schema.optional<Schema.Int>;
987
+ }>>;
988
+ }>]>;
989
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
990
+ readonly _tag: Schema.tag<"GiftItem">;
991
+ readonly itemType: Schema.Enum<{
992
+ readonly None: "None";
993
+ readonly Play: "Play";
994
+ readonly Gift: "Gift";
995
+ readonly Cloud: "Cloud";
996
+ readonly Raffle: "Raffle";
997
+ readonly Visit: "Visit";
998
+ readonly Leaderboards: "Leaderboards";
999
+ }>;
1000
+ readonly item: Schema.String;
1001
+ }>, Schema.Struct<{
1002
+ readonly _tag: Schema.tag<"SpliceItems">;
1003
+ readonly items: Schema.$Array<Schema.Struct<{
1004
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1005
+ readonly item: Schema.optional<Schema.String>;
1006
+ readonly amount: Schema.optional<Schema.Int>;
1007
+ }>>;
1008
+ }>]>;
1009
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
1010
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1011
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1012
+ readonly createdAt: Schema.DateTimeUtcFromString;
1013
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1014
+ readonly failureReason: Schema.optional<Schema.String>;
1015
+ }>>, Schema.toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Forbidden | typeof HttpApiError.ServiceUnavailable>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"GetTrade", "GET", "/v1/treasury/trades/:tradeId", Schema.toCodecStringTree<Schema.Struct<{
1016
+ tradeId: Schema.String;
1017
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1018
+ readonly trade: Schema.Struct<{
1019
+ readonly id: Schema.String;
1020
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
1021
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
1022
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
1023
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
1024
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
1025
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
1026
+ readonly _tag: Schema.tag<"GiftItem">;
1027
+ readonly itemType: Schema.Enum<{
1028
+ readonly None: "None";
1029
+ readonly Play: "Play";
1030
+ readonly Gift: "Gift";
1031
+ readonly Cloud: "Cloud";
1032
+ readonly Raffle: "Raffle";
1033
+ readonly Visit: "Visit";
1034
+ readonly Leaderboards: "Leaderboards";
1035
+ }>;
1036
+ readonly item: Schema.String;
1037
+ }>, Schema.Struct<{
1038
+ readonly _tag: Schema.tag<"SpliceItems">;
1039
+ readonly items: Schema.$Array<Schema.Struct<{
1040
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1041
+ readonly item: Schema.optional<Schema.String>;
1042
+ readonly amount: Schema.optional<Schema.Int>;
1043
+ }>>;
1044
+ }>]>;
1045
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
1046
+ readonly _tag: Schema.tag<"GiftItem">;
1047
+ readonly itemType: Schema.Enum<{
1048
+ readonly None: "None";
1049
+ readonly Play: "Play";
1050
+ readonly Gift: "Gift";
1051
+ readonly Cloud: "Cloud";
1052
+ readonly Raffle: "Raffle";
1053
+ readonly Visit: "Visit";
1054
+ readonly Leaderboards: "Leaderboards";
1055
+ }>;
1056
+ readonly item: Schema.String;
1057
+ }>, Schema.Struct<{
1058
+ readonly _tag: Schema.tag<"SpliceItems">;
1059
+ readonly items: Schema.$Array<Schema.Struct<{
1060
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1061
+ readonly item: Schema.optional<Schema.String>;
1062
+ readonly amount: Schema.optional<Schema.Int>;
1063
+ }>>;
1064
+ }>]>;
1065
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
1066
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1067
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1068
+ readonly createdAt: Schema.DateTimeUtcFromString;
1069
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1070
+ readonly failureReason: Schema.optional<Schema.String>;
1071
+ }>;
1072
+ readonly legs: Schema.$Array<Schema.Struct<{
1073
+ readonly role: Schema.Literals<readonly ["proposer", "counterparty"]>;
1074
+ readonly fromPlayerId: Schema.brand<Schema.String, "PlayerId">;
1075
+ readonly toPlayerId: Schema.brand<Schema.String, "PlayerId">;
1076
+ readonly state: Schema.Literals<readonly ["pending", "sent", "verified", "released", "settled", "refund_sent", "refunded", "lost"]>;
1077
+ readonly itemType: Schema.Enum<{
1078
+ readonly None: "None";
1079
+ readonly Play: "Play";
1080
+ readonly Gift: "Gift";
1081
+ readonly Cloud: "Cloud";
1082
+ readonly Raffle: "Raffle";
1083
+ readonly Visit: "Visit";
1084
+ readonly Leaderboards: "Leaderboards";
1085
+ }>;
1086
+ readonly item: Schema.String;
1087
+ }>>;
1088
+ readonly ledger: Schema.$Array<Schema.Struct<{
1089
+ readonly event: Schema.String;
1090
+ readonly at: Schema.DateTimeUtcFromString;
1091
+ }>>;
1092
+ }>>, Schema.toCodecJson<typeof HttpApiError.NotFound>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"AcceptTrade", "POST", "/v1/treasury/trades/:tradeId/accept", Schema.toCodecStringTree<Schema.Struct<{
1093
+ tradeId: Schema.String;
1094
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1095
+ readonly playerId: Schema.brand<Schema.String, "PlayerId">;
1096
+ }>>, never, Schema.toCodecJson<Schema.Struct<{
1097
+ readonly id: Schema.String;
1098
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
1099
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
1100
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
1101
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
1102
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
1103
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
1104
+ readonly _tag: Schema.tag<"GiftItem">;
1105
+ readonly itemType: Schema.Enum<{
1106
+ readonly None: "None";
1107
+ readonly Play: "Play";
1108
+ readonly Gift: "Gift";
1109
+ readonly Cloud: "Cloud";
1110
+ readonly Raffle: "Raffle";
1111
+ readonly Visit: "Visit";
1112
+ readonly Leaderboards: "Leaderboards";
1113
+ }>;
1114
+ readonly item: Schema.String;
1115
+ }>, Schema.Struct<{
1116
+ readonly _tag: Schema.tag<"SpliceItems">;
1117
+ readonly items: Schema.$Array<Schema.Struct<{
1118
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1119
+ readonly item: Schema.optional<Schema.String>;
1120
+ readonly amount: Schema.optional<Schema.Int>;
1121
+ }>>;
1122
+ }>]>;
1123
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
1124
+ readonly _tag: Schema.tag<"GiftItem">;
1125
+ readonly itemType: Schema.Enum<{
1126
+ readonly None: "None";
1127
+ readonly Play: "Play";
1128
+ readonly Gift: "Gift";
1129
+ readonly Cloud: "Cloud";
1130
+ readonly Raffle: "Raffle";
1131
+ readonly Visit: "Visit";
1132
+ readonly Leaderboards: "Leaderboards";
1133
+ }>;
1134
+ readonly item: Schema.String;
1135
+ }>, Schema.Struct<{
1136
+ readonly _tag: Schema.tag<"SpliceItems">;
1137
+ readonly items: Schema.$Array<Schema.Struct<{
1138
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1139
+ readonly item: Schema.optional<Schema.String>;
1140
+ readonly amount: Schema.optional<Schema.Int>;
1141
+ }>>;
1142
+ }>]>;
1143
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
1144
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1145
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1146
+ readonly createdAt: Schema.DateTimeUtcFromString;
1147
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1148
+ readonly failureReason: Schema.optional<Schema.String>;
1149
+ }>>, Schema.toCodecJson<typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.Conflict | typeof HttpApiError.ServiceUnavailable>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"CancelTrade", "POST", "/v1/treasury/trades/:tradeId/cancel", Schema.toCodecStringTree<Schema.Struct<{
1150
+ tradeId: Schema.String;
1151
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1152
+ readonly id: Schema.String;
1153
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
1154
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
1155
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
1156
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
1157
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
1158
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
1159
+ readonly _tag: Schema.tag<"GiftItem">;
1160
+ readonly itemType: Schema.Enum<{
1161
+ readonly None: "None";
1162
+ readonly Play: "Play";
1163
+ readonly Gift: "Gift";
1164
+ readonly Cloud: "Cloud";
1165
+ readonly Raffle: "Raffle";
1166
+ readonly Visit: "Visit";
1167
+ readonly Leaderboards: "Leaderboards";
1168
+ }>;
1169
+ readonly item: Schema.String;
1170
+ }>, Schema.Struct<{
1171
+ readonly _tag: Schema.tag<"SpliceItems">;
1172
+ readonly items: Schema.$Array<Schema.Struct<{
1173
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1174
+ readonly item: Schema.optional<Schema.String>;
1175
+ readonly amount: Schema.optional<Schema.Int>;
1176
+ }>>;
1177
+ }>]>;
1178
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
1179
+ readonly _tag: Schema.tag<"GiftItem">;
1180
+ readonly itemType: Schema.Enum<{
1181
+ readonly None: "None";
1182
+ readonly Play: "Play";
1183
+ readonly Gift: "Gift";
1184
+ readonly Cloud: "Cloud";
1185
+ readonly Raffle: "Raffle";
1186
+ readonly Visit: "Visit";
1187
+ readonly Leaderboards: "Leaderboards";
1188
+ }>;
1189
+ readonly item: Schema.String;
1190
+ }>, Schema.Struct<{
1191
+ readonly _tag: Schema.tag<"SpliceItems">;
1192
+ readonly items: Schema.$Array<Schema.Struct<{
1193
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1194
+ readonly item: Schema.optional<Schema.String>;
1195
+ readonly amount: Schema.optional<Schema.Int>;
1196
+ }>>;
1197
+ }>]>;
1198
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
1199
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1200
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1201
+ readonly createdAt: Schema.DateTimeUtcFromString;
1202
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1203
+ readonly failureReason: Schema.optional<Schema.String>;
1204
+ }>>, Schema.toCodecJson<typeof HttpApiError.NotFound | typeof HttpApiError.Conflict>, OAuthScope.RequireAccess, never> | HttpApiEndpoint.HttpApiEndpoint<"ConfirmSplice", "POST", "/v1/treasury/trades/:tradeId/confirm", Schema.toCodecStringTree<Schema.Struct<{
1205
+ tradeId: Schema.String;
1206
+ }>>, never, never, never, Schema.toCodecJson<Schema.Struct<{
1207
+ readonly id: Schema.String;
1208
+ readonly mechanism: Schema.Literals<readonly ["gift", "splice"]>;
1209
+ readonly game: Schema.Literals<readonly ["tinytower"]>;
1210
+ readonly state: Schema.Literals<readonly ["proposed", "accepted", "awaiting_confirmation", "escrowing", "escrowed", "releasing", "executing", "settled", "cancelled", "refunding", "refunded", "expired", "failed"]>;
1211
+ readonly proposerPlayerId: Schema.brand<Schema.String, "PlayerId">;
1212
+ readonly counterpartyPlayerId: Schema.optional<Schema.brand<Schema.String, "PlayerId">>;
1213
+ readonly gives: Schema.Union<readonly [Schema.Struct<{
1214
+ readonly _tag: Schema.tag<"GiftItem">;
1215
+ readonly itemType: Schema.Enum<{
1216
+ readonly None: "None";
1217
+ readonly Play: "Play";
1218
+ readonly Gift: "Gift";
1219
+ readonly Cloud: "Cloud";
1220
+ readonly Raffle: "Raffle";
1221
+ readonly Visit: "Visit";
1222
+ readonly Leaderboards: "Leaderboards";
1223
+ }>;
1224
+ readonly item: Schema.String;
1225
+ }>, Schema.Struct<{
1226
+ readonly _tag: Schema.tag<"SpliceItems">;
1227
+ readonly items: Schema.$Array<Schema.Struct<{
1228
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1229
+ readonly item: Schema.optional<Schema.String>;
1230
+ readonly amount: Schema.optional<Schema.Int>;
1231
+ }>>;
1232
+ }>]>;
1233
+ readonly wants: Schema.Union<readonly [Schema.Struct<{
1234
+ readonly _tag: Schema.tag<"GiftItem">;
1235
+ readonly itemType: Schema.Enum<{
1236
+ readonly None: "None";
1237
+ readonly Play: "Play";
1238
+ readonly Gift: "Gift";
1239
+ readonly Cloud: "Cloud";
1240
+ readonly Raffle: "Raffle";
1241
+ readonly Visit: "Visit";
1242
+ readonly Leaderboards: "Leaderboards";
1243
+ }>;
1244
+ readonly item: Schema.String;
1245
+ }>, Schema.Struct<{
1246
+ readonly _tag: Schema.tag<"SpliceItems">;
1247
+ readonly items: Schema.$Array<Schema.Struct<{
1248
+ readonly kind: Schema.Literals<readonly ["bitizen", "costume", "pet", "coins", "bux"]>;
1249
+ readonly item: Schema.optional<Schema.String>;
1250
+ readonly amount: Schema.optional<Schema.Int>;
1251
+ }>>;
1252
+ }>]>;
1253
+ readonly role: Schema.optional<Schema.Literals<readonly ["proposer", "counterparty"]>>;
1254
+ readonly proposerConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1255
+ readonly counterpartyConfirmedAt: Schema.optional<Schema.DateTimeUtcFromString>;
1256
+ readonly createdAt: Schema.DateTimeUtcFromString;
1257
+ readonly expiresAt: Schema.DateTimeUtcFromString;
1258
+ readonly failureReason: Schema.optional<Schema.String>;
1259
+ }>>, Schema.toCodecJson<typeof HttpApiError.NotFound | typeof HttpApiError.Conflict>, OAuthScope.RequireAccess, never>, false> | HttpApiGroup.HttpApiGroup<"TreasuryPublicGroup", HttpApiEndpoint.HttpApiEndpoint<"Stats", "GET", "/v1/treasury/stats", never, never, never, never, Schema.toCodecJson<Schema.Struct<{
1260
+ readonly activeTraders: Schema.Int;
1261
+ readonly settledTrades: Schema.Int;
1262
+ readonly itemsMoved: Schema.Int;
1263
+ }>>, never, never, never>, false>>;
1264
+ //# sourceMappingURL=Sdk.d.ts.map