@phantomclient/plugin 0.1.0 → 0.1.1

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.
@@ -40,6 +40,10 @@ declare const Achievements: PacketDefinition<{
40
40
  archived: boolean;
41
41
  achievements: AchievementEntry[];
42
42
  }>;
43
+ type AdoptAPetCard = {
44
+ defId: number;
45
+ invId: number;
46
+ };
43
47
  type RoomPet = {
44
48
  lBits: number;
45
49
  uBits: number;
@@ -117,6 +121,18 @@ type OwnListedAvatar = {
117
121
  avTypeId: number;
118
122
  customAvId: number;
119
123
  };
124
+ type AvatarListFields = {
125
+ own: true;
126
+ userName: string;
127
+ slotFlags: number;
128
+ uuid: string;
129
+ avatars: OwnListedAvatar[];
130
+ } | {
131
+ own: false;
132
+ userName: string;
133
+ perUserAvIds: number[];
134
+ };
135
+ declare const AvatarList: PacketDefinition<AvatarListFields>;
120
136
  type LookedUpAvatar = {
121
137
  accountType: number;
122
138
  isGuide: boolean;
@@ -151,6 +167,39 @@ type AvatarLookupFields = {
151
167
  avatar: LookedUpAvatar | null;
152
168
  };
153
169
  declare const AvatarLookup: PacketDefinition<AvatarLookupFields>;
170
+ declare const AvatarKilled: PacketDefinition<{
171
+ success: boolean;
172
+ extra: number;
173
+ }>;
174
+ type AvatarNameIds = readonly [
175
+ number,
176
+ number,
177
+ number
178
+ ];
179
+ declare const AvatarAdded: PacketDefinition<{
180
+ status: number;
181
+ perUserAvId: number;
182
+ avInvId: number;
183
+ }>;
184
+ declare const AvatarSlotBought: PacketDefinition<{
185
+ success: boolean;
186
+ }>;
187
+ declare const AvatarFastPassAdded: PacketDefinition<{
188
+ success: boolean;
189
+ }>;
190
+ declare const AvatarNameBarChanged: PacketDefinition<{
191
+ userId: number;
192
+ nameBarData: number;
193
+ }>;
194
+ declare const AvatarOrdained: PacketDefinition<{
195
+ success: boolean;
196
+ }>;
197
+ declare const AvatarPhotoTaken: PacketDefinition<{
198
+ gems: number;
199
+ }>;
200
+ declare const AvatarPhotoChecked: PacketDefinition<{
201
+ gems: number;
202
+ }>;
154
203
  type BuddyEntry = {
155
204
  userName: string;
156
205
  uuid: string;
@@ -159,6 +208,16 @@ type BuddyEntry = {
159
208
  accountType: number;
160
209
  partyTimeLeft: number | null;
161
210
  };
211
+ declare const BuddyList: PacketDefinition<{
212
+ blocked: boolean;
213
+ buddies: BuddyEntry[];
214
+ blockedUserNames: string[];
215
+ }>;
216
+ declare const BuddyAddResult: PacketDefinition<{
217
+ status: number;
218
+ userName: string;
219
+ userNameModerationFlag: number;
220
+ }>;
162
221
  declare const BuddyLocation: PacketDefinition<{
163
222
  roomName: string;
164
223
  displayName: string;
@@ -211,8 +270,8 @@ declare const DenPrivacy: {
211
270
  type DenPrivacy = (typeof DenPrivacy)[keyof typeof DenPrivacy];
212
271
  declare const DenVisitorCount: PacketDefinition<{
213
272
  count: number;
214
- countsOwner: boolean;
215
- ownerName: string;
273
+ entering: boolean;
274
+ userName: string;
216
275
  }>;
217
276
  type DenRoom = {
218
277
  invIdx: number;
@@ -227,6 +286,90 @@ type DenMasterpieceItem = {
227
286
  uniqueImageCreatorDbId: number;
228
287
  uniqueImageCreatorUUID: string;
229
288
  };
289
+ type DenMannequinLook = {
290
+ baseColor: number;
291
+ patternColor: number;
292
+ patternDefId: number;
293
+ eyeColor: number;
294
+ eyeDefId: number;
295
+ };
296
+ declare const MANNEQUIN_SLOTS: readonly [
297
+ "tail",
298
+ "leg",
299
+ "back",
300
+ "neck",
301
+ "head"
302
+ ];
303
+ type MannequinSlot = (typeof MANNEQUIN_SLOTS)[number];
304
+ type DenMannequinInvIds = DenMannequinLook & {
305
+ tailInvId: number;
306
+ legInvId: number;
307
+ backInvId: number;
308
+ neckInvId: number;
309
+ headInvId: number;
310
+ };
311
+ type DenMannequinWorn = {
312
+ defId: number;
313
+ color: number;
314
+ invIdx: number;
315
+ };
316
+ type DenMannequinOutfit = DenMannequinLook & Record<MannequinSlot, DenMannequinWorn>;
317
+ type DenOwnedItem = {
318
+ invIdx: number;
319
+ defId: number;
320
+ categoryId: number;
321
+ version: number;
322
+ approved: boolean;
323
+ uniqueImageId: string;
324
+ uniqueImageCreatorDbId: number;
325
+ uniqueImageCreatorUUID: string;
326
+ mannequin: DenMannequinInvIds | null;
327
+ denStoreInvId: number;
328
+ };
329
+ type DenStateEntry = {
330
+ invIdx: number;
331
+ defId: number;
332
+ placed: boolean;
333
+ x: number;
334
+ y: number;
335
+ version: number;
336
+ flipped: number;
337
+ userNameLink: string | null;
338
+ uniqueImageId: string;
339
+ uniqueImageCreatorDbId: number;
340
+ uniqueImageCreatorUUID: string;
341
+ mannequin: DenMannequinOutfit | null;
342
+ ecoConsumerStateId: number;
343
+ };
344
+ type DenStatePet = {
345
+ invIdx: number;
346
+ lBits: number;
347
+ uBits: number;
348
+ eBits: number;
349
+ catId: number;
350
+ x: number;
351
+ y: number;
352
+ flipped: number;
353
+ createdTs: number;
354
+ traitDefId: number;
355
+ toyDefId: number;
356
+ foodDefId: number;
357
+ name: string;
358
+ };
359
+ type DenStateChange = {
360
+ refId: number;
361
+ invIdx: number;
362
+ placed: boolean;
363
+ x: number;
364
+ y: number;
365
+ flipped: number;
366
+ userNameLink: string;
367
+ mannequin: DenMannequinInvIds | null;
368
+ };
369
+ type DenEcoConsumer = {
370
+ invIdx: number;
371
+ stateId: number;
372
+ };
230
373
  type JamAGram = {
231
374
  messageId: number;
232
375
  senderUserName: string;
@@ -372,6 +515,28 @@ declare const MinigameLeaderboard: PacketDefinition<{
372
515
  thisWeek: LeaderboardEntry[];
373
516
  buddies: LeaderboardEntry[];
374
517
  }>;
518
+ type MinigameAwardSums = {
519
+ amountSum: number;
520
+ gameSum: number;
521
+ checkSum: number;
522
+ };
523
+ type MinigameAward = {
524
+ amount: number;
525
+ gameDefId: number;
526
+ userId: number;
527
+ };
528
+ type MinigameScoreSums = {
529
+ mainSum: number;
530
+ valueSum: number;
531
+ numSum: number;
532
+ varRefSum: number;
533
+ gameSum: number;
534
+ };
535
+ type MinigameScore = {
536
+ score: number;
537
+ leaderboardUserVarRef: number;
538
+ gameDefId: number;
539
+ };
375
540
  declare const NewspaperPageSeen: PacketDefinition<{
376
541
  defId: number;
377
542
  timeSeen: number;
@@ -388,6 +553,14 @@ type CustomParty = {
388
553
  defId: number;
389
554
  timeLeft: number;
390
555
  };
556
+ type PoolMasterpiece = {
557
+ frameId: number;
558
+ resourceId: number;
559
+ userName: string;
560
+ creatorDbId: number;
561
+ creatorUuid: string;
562
+ raw: Record<string, unknown>;
563
+ };
391
564
  declare const CustomPartyHostResult: PacketDefinition<{
392
565
  secondsLeft: number | null;
393
566
  hosting: boolean;
@@ -428,6 +601,12 @@ type QuestJoinOutcome = {
428
601
  extra: string[];
429
602
  };
430
603
  declare const QuestJoinResult: PacketDefinition<QuestJoinOutcome>;
604
+ declare const QuestWaiting: PacketDefinition<{
605
+ userIds: number[];
606
+ }>;
607
+ declare const QuestJoinCancelled: PacketDefinition<{
608
+ extra: string[];
609
+ }>;
431
610
  type QuestActorInfo = {
432
611
  actorId: string;
433
612
  type: number;
@@ -475,15 +654,119 @@ declare const QuestAward: PacketDefinition<{
475
654
  userVarId: number;
476
655
  value: number;
477
656
  }>;
657
+ declare const QuestExitByType: PacketDefinition<{
658
+ exitType: string;
659
+ }>;
660
+ type QuestBundledMessage = {
661
+ command: string;
662
+ args: string[];
663
+ };
664
+ type QuestDroppedTreasure = {
665
+ subType: number;
666
+ denDefId: number | null;
667
+ itemDefId: number | null;
668
+ color: number | null;
669
+ amount: number | null;
670
+ };
671
+ declare const QuestActorSpawned: PacketDefinition<{
672
+ spawnedFrom: string;
673
+ actorId: string;
674
+ type: number;
675
+ defId: number;
676
+ dropped: QuestDroppedTreasure | null;
677
+ spawnOffset: {
678
+ x: number;
679
+ y: number;
680
+ } | null;
681
+ extra: string[];
682
+ }>;
683
+ declare const QuestActorMoved: PacketDefinition<{
684
+ actorId: string;
685
+ x: number;
686
+ y: number;
687
+ velocity: number;
688
+ seekType: number;
689
+ nearestX: number;
690
+ nearestY: number;
691
+ }>;
478
692
  declare const QuestActorSeek: PacketDefinition<{
479
693
  actorId: string;
480
694
  seekType: number;
481
695
  userId: number;
482
696
  }>;
697
+ declare const QuestActorHealth: PacketDefinition<{
698
+ actorId: string;
699
+ healthPercent: number;
700
+ missed: boolean;
701
+ damage: number | null;
702
+ fierce: boolean | null;
703
+ extra: string[];
704
+ }>;
705
+ declare const QuestActorDied: PacketDefinition<{
706
+ actorId: string;
707
+ damage: number;
708
+ moved: boolean;
709
+ x: number;
710
+ y: number;
711
+ otherActorId: string;
712
+ }>;
713
+ declare const QuestActorRestored: PacketDefinition<{
714
+ actorId: string;
715
+ healthPercent: number;
716
+ }>;
717
+ declare const QuestCommand: PacketDefinition<{
718
+ command: number;
719
+ actorId: null;
720
+ state: null;
721
+ visible: null;
722
+ requireClick: null;
723
+ args: string[];
724
+ } | {
725
+ command: 1;
726
+ actorId: string;
727
+ state: number;
728
+ visible: boolean | null;
729
+ requireClick: boolean | null;
730
+ args: string[];
731
+ }>;
732
+ declare const QuestVariable: PacketDefinition<{
733
+ command: number;
734
+ actorId: null;
735
+ state: null;
736
+ visible: null;
737
+ requireClick: null;
738
+ args: string[];
739
+ } | {
740
+ command: 1;
741
+ actorId: string;
742
+ state: number;
743
+ visible: boolean | null;
744
+ requireClick: boolean | null;
745
+ args: string[];
746
+ }>;
747
+ declare const QuestActorSwfState: PacketDefinition<{
748
+ actorId: string;
749
+ swfState: string;
750
+ }>;
751
+ declare const QuestActorPath: PacketDefinition<{
752
+ actorId: string;
753
+ pathName: string;
754
+ }>;
483
755
  declare const QuestActorIcon: PacketDefinition<{
484
756
  actorId: string;
485
757
  showing: boolean;
486
758
  }>;
759
+ type QuestMovedItem = {
760
+ actorId: string;
761
+ innerRadius: number;
762
+ outerRadius: number;
763
+ x: number;
764
+ y: number;
765
+ };
766
+ declare const QuestMovedItems: PacketDefinition<{
767
+ items: QuestMovedItem[];
768
+ extra: string[];
769
+ }>;
487
770
  declare const QuestPickUpResult: PacketDefinition<{
488
771
  extra: string[];
489
772
  result: number;
@@ -502,6 +785,9 @@ declare const QuestGiveItem: PacketDefinition<{
502
785
  declare const QuestPlayerDead: PacketDefinition<{
503
786
  userId: number;
504
787
  }>;
788
+ declare const QuestCrystals: PacketDefinition<{
789
+ crystals: number;
790
+ }>;
505
791
  declare const QuestExited: PacketDefinition<{
506
792
  extra: string[];
507
793
  }>;
@@ -542,6 +828,75 @@ declare const QuestAvSwitch: PacketDefinition<{
542
828
  avatarRefId: number | null;
543
829
  userId: number;
544
830
  }>;
831
+ declare const QuestPlayerAttacked: PacketDefinition<{
832
+ actorId: string;
833
+ userId: number;
834
+ weaponDefId: number;
835
+ color: number;
836
+ }>;
837
+ declare const QuestBeamZapped: PacketDefinition<{
838
+ actorId: string;
839
+ userId: number;
840
+ }>;
841
+ declare const QuestPhantomZapped: PacketDefinition<{
842
+ actorId: string;
843
+ userId: number;
844
+ }>;
845
+ declare const QuestProjectileLaunched: PacketDefinition<{
846
+ weaponDefId: number;
847
+ x: number;
848
+ y: number;
849
+ actorId: string;
850
+ userId: number;
851
+ color: number;
852
+ }>;
853
+ declare const QuestSwiped: PacketDefinition<{
854
+ weaponDefId: number;
855
+ x: number;
856
+ y: number;
857
+ actorId: string;
858
+ userId: number;
859
+ color: number;
860
+ }>;
861
+ declare const QuestRespawnGranted: PacketDefinition<{
862
+ extra: string[];
863
+ }>;
864
+ declare const QuestSideScrollMoved: PacketDefinition<{
865
+ userId: number;
866
+ x: number;
867
+ y: number;
868
+ extra: string[];
869
+ }>;
870
+ declare const QuestPlayerRoomChange: PacketDefinition<{
871
+ userId: number;
872
+ roomName: string;
873
+ x: number;
874
+ y: number;
875
+ }>;
876
+ declare const QuestTorch: PacketDefinition<{
877
+ target: number;
878
+ lit: boolean;
879
+ actorId: string | null;
880
+ userId: number | null;
881
+ }>;
882
+ declare const QuestPlaySwf: PacketDefinition<{
883
+ mediaId: number;
884
+ }>;
885
+ declare const QuestPreloadSwf: PacketDefinition<{
886
+ mediaId: number;
887
+ }>;
888
+ declare const QuestFade: PacketDefinition<{
889
+ fadeIn: boolean;
890
+ }>;
891
+ declare const QuestShake: PacketDefinition<{
892
+ milliseconds: number;
893
+ }>;
894
+ declare const QuestMusic: PacketDefinition<{
895
+ name: string;
896
+ }>;
897
+ declare const QuestPostUri: PacketDefinition<{
898
+ uri: string;
899
+ }>;
545
900
  type JoinedRoom = {
546
901
  name: string;
547
902
  id: number;
@@ -764,6 +1119,12 @@ type ShardNode = {
764
1119
  declare const NodeHop: PacketDefinition<{
765
1120
  host: string;
766
1121
  }>;
1122
+ type Referral = {
1123
+ userName: string;
1124
+ moderatedUserName: string | null;
1125
+ nameBarData: number | null;
1126
+ accountType: string;
1127
+ };
767
1128
  interface ClientClasses {
768
1129
  [name: string]: any;
769
1130
  }
@@ -1037,7 +1398,7 @@ type KeySpec = {
1037
1398
  alt: boolean | null;
1038
1399
  phase: "down" | "up";
1039
1400
  consume: boolean;
1040
- whileTyping: boolean;
1401
+ whileTyping: "never" | "empty" | "always";
1041
1402
  repeat: boolean;
1042
1403
  };
1043
1404
  type NoteVerb = "write" | "read" | "has" | "forget" | "keys" | "clear";
@@ -1404,6 +1765,7 @@ type BridgeMessage = {
1404
1765
  shift: boolean;
1405
1766
  alt: boolean;
1406
1767
  phase: "down" | "up";
1768
+ consumed?: boolean;
1407
1769
  };
1408
1770
  type BridgeErrorCode = "FLASH" | "TIMEOUT" | "CLOSED" | "NOT_READY" | "VERSION";
1409
1771
  declare class BridgeError extends Error {
@@ -1855,6 +2217,7 @@ type OverlayNode = (() => Promise<void>) & {
1855
2217
  on(event: OverlayMouseEvent, listener: (position: Position) => void): () => Promise<void>;
1856
2218
  on(event: "link", listener: (value: string) => void): () => Promise<void>;
1857
2219
  onFailed(listener: (message: string) => void): () => void;
2220
+ onRemoved(listener: () => void): () => void;
1858
2221
  };
1859
2222
  type InputNode = OverlayNode & {
1860
2223
  update(changes: InputOptions): Promise<void>;
@@ -1960,7 +2323,7 @@ type FoundPlaces<Name> = Name extends keyof ClientInstances ? TypedFlash<ClientI
1960
2323
  type KeyOptions = {
1961
2324
  phase?: "down" | "up";
1962
2325
  consume?: boolean;
1963
- whileTyping?: boolean;
2326
+ whileTyping?: boolean | "never" | "empty" | "always";
1964
2327
  repeat?: boolean;
1965
2328
  };
1966
2329
  type KeyPress = {
@@ -1970,6 +2333,7 @@ type KeyPress = {
1970
2333
  shift: boolean;
1971
2334
  alt: boolean;
1972
2335
  phase: "down" | "up";
2336
+ consumed: boolean;
1973
2337
  };
1974
2338
  declare class FlashNotes<Value extends FlashData = FlashData> {
1975
2339
  private readonly bridge;
@@ -2092,6 +2456,9 @@ type PacketProblem = {
2092
2456
  error: Error;
2093
2457
  text: string;
2094
2458
  };
2459
+ type PacketWatchOptions = {
2460
+ original?: boolean;
2461
+ };
2095
2462
  type MessageHook = (message: Message) => void | Promise<void>;
2096
2463
  declare class Side {
2097
2464
  private readonly channel;
@@ -2103,156 +2470,30 @@ declare class Side {
2103
2470
  send(what: Message | string): Promise<void>;
2104
2471
  on<Fields>(what: PacketDefinition<Fields>, hook: PacketHook<Fields>): Unsubscribe;
2105
2472
  on(what: string, hook: MessageHook): Unsubscribe;
2106
- watch<Fields>(what: PacketDefinition<Fields>, listener: (packet: Packet<Fields>) => void): Unsubscribe;
2107
- watch(what: string, listener: (message: Message) => void): Unsubscribe;
2473
+ watch<Fields>(what: PacketDefinition<Fields>, listener: (packet: Packet<Fields>) => void, options?: PacketWatchOptions): Unsubscribe;
2474
+ watch(what: string, listener: (message: Message) => void, options?: PacketWatchOptions): Unsubscribe;
2108
2475
  private read;
2109
2476
  private checked;
2110
2477
  }
2111
- declare const BUBBLES: readonly [
2112
- {
2113
- readonly id: "phantom";
2114
- readonly name: "Phantom";
2115
- readonly fill: 1118483;
2116
- readonly border: 3816000;
2117
- readonly text: 15790322;
2118
- readonly alpha: 0.95;
2119
- },
2120
- {
2121
- readonly id: "classic";
2122
- readonly name: "Classic";
2123
- readonly fill: 16777215;
2124
- readonly border: 10265519;
2125
- readonly text: 1120295;
2126
- readonly alpha: 0.96;
2127
- },
2128
- {
2129
- readonly id: "midnight";
2130
- readonly name: "Midnight";
2131
- readonly fill: 988970;
2132
- readonly border: 3718648;
2133
- readonly text: 14742270;
2134
- readonly alpha: 0.94;
2135
- },
2136
- {
2137
- readonly id: "candy";
2138
- readonly name: "Candy";
2139
- readonly fill: 16642808;
2140
- readonly border: 15485081;
2141
- readonly text: 8591427;
2142
- readonly alpha: 0.96;
2143
- },
2144
- {
2145
- readonly id: "mint";
2146
- readonly name: "Mint";
2147
- readonly fill: 15531509;
2148
- readonly border: 1096065;
2149
- readonly text: 413243;
2150
- readonly alpha: 0.96;
2151
- },
2152
- {
2153
- readonly id: "sunset";
2154
- readonly name: "Sunset";
2155
- readonly fill: 16775149;
2156
- readonly border: 16347926;
2157
- readonly text: 8138002;
2158
- readonly alpha: 0.96;
2159
- },
2160
- {
2161
- readonly id: "gold";
2162
- readonly name: "Gold";
2163
- readonly fill: 2694917;
2164
- readonly border: 16436245;
2165
- readonly text: 16710083;
2166
- readonly alpha: 0.94;
2167
- }
2168
- ];
2169
- type BubbleId = (typeof BUBBLES)[number]["id"];
2170
- type CommunityRoom = {
2171
- key: string;
2172
- name: string;
2173
- };
2174
- type CommunityMember = {
2478
+ type HiddenPlayer = {
2175
2479
  screenName: string;
2176
- bubble: BubbleId;
2177
- };
2178
- type CommunityMessage = {
2179
- id: string;
2180
- from: string;
2181
- text: string;
2182
- bubble: BubbleId;
2183
- at: number;
2184
- };
2185
- type CommunityRequest = {
2186
- id: string;
2187
- kind: "invite" | "ask";
2188
- from: string;
2189
- room: CommunityRoom | null;
2190
- at: number;
2191
- };
2192
- type CommunityAnswer = {
2193
- id: string;
2194
- kind: "invite" | "ask";
2195
- by: string;
2196
- accepted: boolean;
2197
- room: CommunityRoom | null;
2198
- };
2199
- type CommunityStatus = {
2200
- state: "off" | "connecting" | "online" | "offline" | "refused";
2201
- screenName: string | null;
2202
- room: string | null;
2203
- error: string | null;
2204
- };
2205
- type CommunityOnline = {
2206
- count: number;
2207
- listed: readonly string[];
2208
- };
2209
- type CommunityJoinOptions = {
2210
- bubble?: BubbleId;
2211
- listed?: boolean;
2212
2480
  };
2213
2481
  type CommunityChannel = {
2214
- status(): CommunityStatus;
2215
- onStatus(listener: (status: CommunityStatus) => void): Unsubscribe;
2216
- join(options: Required<CommunityJoinOptions>): Promise<void>;
2217
- leave(): Promise<void>;
2218
- members(): readonly CommunityMember[];
2219
- onMembers(listener: (members: readonly CommunityMember[]) => void): Unsubscribe;
2220
- say(text: string, bubble: BubbleId | null): Promise<void>;
2221
- onMessage(listener: (message: CommunityMessage) => void): Unsubscribe;
2222
- online(): Promise<CommunityOnline>;
2223
- report(messageId: string, reason: string): Promise<void>;
2224
- invite(screenName: string): Promise<void>;
2225
- ask(screenName: string): Promise<void>;
2226
- answer(requestId: string, accept: boolean): Promise<void>;
2227
- onRequest(listener: (request: CommunityRequest) => void): Unsubscribe;
2228
- onAnswered(listener: (answer: CommunityAnswer) => void): Unsubscribe;
2482
+ hidden(): Promise<readonly HiddenPlayer[]>;
2483
+ onHidden(listener: (hidden: readonly HiddenPlayer[]) => void): Unsubscribe;
2484
+ hide(screenName: string): Promise<void>;
2485
+ unhide(screenName: string): Promise<void>;
2486
+ report(screenName: string, reason: string): Promise<void>;
2229
2487
  };
2230
2488
  declare class CommunityApi {
2231
- private readonly game;
2232
- private readonly flash;
2233
2489
  private readonly channel;
2234
- private captured;
2235
- constructor(game: GameContext, flash: PhantomFlash);
2490
+ constructor(game: GameContext);
2236
2491
  get available(): boolean;
2237
- get status(): CommunityStatus;
2238
- onStatus(listener: (status: CommunityStatus) => void): Unsubscribe;
2239
- join(options?: CommunityJoinOptions): Promise<void>;
2240
- leave(): Promise<void>;
2241
- get members(): readonly CommunityMember[];
2242
- onMembers(listener: (members: readonly CommunityMember[]) => void): Unsubscribe;
2243
- say(text: string, options?: {
2244
- bubble?: BubbleId;
2245
- }): Promise<void>;
2246
- onMessage(listener: (message: CommunityMessage) => void): Unsubscribe;
2247
- online(): Promise<CommunityOnline>;
2248
- report(messageId: string, reason?: string): Promise<void>;
2249
- invite(screenName: string): Promise<void>;
2250
- askToJoin(screenName: string): Promise<void>;
2251
- answer(requestId: string, accept: boolean): Promise<void>;
2252
- onRequest(listener: (request: CommunityRequest) => void): Unsubscribe;
2253
- onAnswered(listener: (answer: CommunityAnswer) => void): Unsubscribe;
2254
- captureChat(prefix: string | null): Promise<void>;
2255
- private patchChatBar;
2492
+ hidden(): Promise<readonly HiddenPlayer[]>;
2493
+ onHidden(listener: (hidden: readonly HiddenPlayer[]) => void): Unsubscribe;
2494
+ hide(screenName: string): Promise<void>;
2495
+ unhide(screenName: string): Promise<void>;
2496
+ report(screenName: string, reason?: string): Promise<void>;
2256
2497
  private reach;
2257
2498
  }
2258
2499
  type ContentMatch = {
@@ -2356,30 +2597,434 @@ declare class ContentApi {
2356
2597
  private whenLoaded;
2357
2598
  private reach;
2358
2599
  }
2359
- type GameContext = {
2360
- flash: FlashBridge;
2361
- server: Side;
2362
- client: Side;
2363
- content?: ContentChannel;
2364
- community?: CommunityChannel;
2365
- undo?: (key: string, requests: readonly string[] | null) => void;
2600
+ type CustomRoomPicture = string | Uint8Array;
2601
+ type CustomRoomMotion = {
2602
+ pulse?: {
2603
+ seconds: number;
2604
+ min?: number;
2605
+ };
2606
+ spin?: {
2607
+ seconds: number;
2608
+ };
2609
+ bob?: {
2610
+ seconds: number;
2611
+ height: number;
2612
+ };
2366
2613
  };
2367
- type PlayerAchievements = PacketOf<typeof Achievements>;
2368
- type AchievementDescription = {
2369
- defId: number;
2370
- name: string;
2371
- description: string;
2372
- type: number;
2373
- typeName: string;
2374
- userVarId: number;
2375
- triggerAmount: number;
2376
- iconMediaId: number;
2377
- baseMediaId: number;
2378
- extraText: string;
2614
+ type CustomRoomFrames = {
2615
+ count: number;
2616
+ fps: number;
2379
2617
  };
2380
- type AchievementType = {
2381
- type: number;
2382
- name: string;
2618
+ type CustomRoomArea = {
2619
+ rect: {
2620
+ x: number;
2621
+ y: number;
2622
+ width: number;
2623
+ height: number;
2624
+ };
2625
+ } | {
2626
+ circle: {
2627
+ x: number;
2628
+ y: number;
2629
+ radius: number;
2630
+ };
2631
+ } | {
2632
+ polygon: Array<[
2633
+ number,
2634
+ number
2635
+ ]>;
2636
+ };
2637
+ type CustomRoomProp = {
2638
+ id: string;
2639
+ art: CustomRoomPicture;
2640
+ x: number;
2641
+ y: number;
2642
+ width?: number;
2643
+ height?: number;
2644
+ layer?: "floor" | "standing" | "front";
2645
+ motion?: CustomRoomMotion;
2646
+ frames?: CustomRoomFrames;
2647
+ solid?: boolean;
2648
+ area?: CustomRoomArea;
2649
+ clickable?: boolean;
2650
+ nearDistance?: number;
2651
+ bounce?: boolean;
2652
+ };
2653
+ type CustomRoomExit = {
2654
+ id: string;
2655
+ x: number;
2656
+ y: number;
2657
+ radius: number;
2658
+ };
2659
+ type CustomRoomSpec = {
2660
+ name: string;
2661
+ width: number;
2662
+ height: number;
2663
+ background: CustomRoomPicture;
2664
+ walkable?: CustomRoomArea[];
2665
+ blocked?: CustomRoomArea[];
2666
+ spawn: {
2667
+ x: number;
2668
+ y: number;
2669
+ };
2670
+ props?: CustomRoomProp[];
2671
+ exits?: CustomRoomExit[];
2672
+ music?: {
2673
+ track: string;
2674
+ volume?: number;
2675
+ };
2676
+ };
2677
+ type CustomRoomEnterOptions = {
2678
+ shared?: boolean;
2679
+ };
2680
+ type CustomRoomInfo = {
2681
+ id: string;
2682
+ name: string;
2683
+ shared?: boolean;
2684
+ };
2685
+ type CustomRoomLeaveReason = "left" | "exit" | "elsewhere" | "closed";
2686
+ type CustomRoomEvent = {
2687
+ kind: "enter";
2688
+ room: CustomRoomInfo;
2689
+ } | {
2690
+ kind: "leave";
2691
+ room: CustomRoomInfo;
2692
+ reason: CustomRoomLeaveReason;
2693
+ } | {
2694
+ kind: "move";
2695
+ room: CustomRoomInfo;
2696
+ x: number;
2697
+ y: number;
2698
+ } | {
2699
+ kind: "chat";
2700
+ room: CustomRoomInfo;
2701
+ text: string;
2702
+ chatKind: number;
2703
+ } | {
2704
+ kind: "propEnter" | "propLeave" | "propNear" | "propClick";
2705
+ room: CustomRoomInfo;
2706
+ prop: string;
2707
+ };
2708
+ type SharedRoomListing = {
2709
+ name: string;
2710
+ title: string;
2711
+ people: number;
2712
+ };
2713
+ type CustomRoomsChannel = {
2714
+ define(spec: CustomRoomSpec): Promise<string>;
2715
+ shared(): Promise<SharedRoomListing[]>;
2716
+ remove(roomId: string): Promise<boolean>;
2717
+ enter(roomId: string, options?: CustomRoomEnterOptions): Promise<void>;
2718
+ leave(): Promise<boolean>;
2719
+ current(): CustomRoomInfo | null;
2720
+ onEvent(listener: (event: CustomRoomEvent) => void): Unsubscribe;
2721
+ };
2722
+ declare class CustomRoomsApi {
2723
+ private readonly channel;
2724
+ constructor(game: GameContext);
2725
+ get available(): boolean;
2726
+ define(spec: CustomRoomSpec): Promise<string>;
2727
+ remove(roomId: string): Promise<boolean>;
2728
+ enter(roomId: string, options?: CustomRoomEnterOptions): Promise<void>;
2729
+ shared(): Promise<SharedRoomListing[]>;
2730
+ leave(): Promise<boolean>;
2731
+ get current(): CustomRoomInfo | null;
2732
+ onEnter(listener: (room: CustomRoomInfo) => void): Unsubscribe;
2733
+ onLeave(listener: (event: {
2734
+ room: CustomRoomInfo;
2735
+ reason: CustomRoomLeaveReason;
2736
+ }) => void): Unsubscribe;
2737
+ onMove(listener: (event: {
2738
+ room: CustomRoomInfo;
2739
+ x: number;
2740
+ y: number;
2741
+ }) => void): Unsubscribe;
2742
+ onChat(listener: (event: {
2743
+ room: CustomRoomInfo;
2744
+ text: string;
2745
+ kind: number;
2746
+ }) => void): Unsubscribe;
2747
+ onPropEnter(listener: (event: {
2748
+ room: CustomRoomInfo;
2749
+ prop: string;
2750
+ }) => void): Unsubscribe;
2751
+ onPropLeave(listener: (event: {
2752
+ room: CustomRoomInfo;
2753
+ prop: string;
2754
+ }) => void): Unsubscribe;
2755
+ onPropNear(listener: (event: {
2756
+ room: CustomRoomInfo;
2757
+ prop: string;
2758
+ }) => void): Unsubscribe;
2759
+ onPropClick(listener: (event: {
2760
+ room: CustomRoomInfo;
2761
+ prop: string;
2762
+ }) => void): Unsubscribe;
2763
+ private onProp;
2764
+ private on;
2765
+ private reach;
2766
+ }
2767
+ type RealtimeChannelSpec = {
2768
+ scope: "room";
2769
+ } | {
2770
+ scope: "plugin";
2771
+ } | {
2772
+ scope: "named";
2773
+ name: string;
2774
+ split?: boolean;
2775
+ };
2776
+ type RealtimeScope = RealtimeChannelSpec["scope"];
2777
+ type RealtimeObject = Record<string, unknown>;
2778
+ type RealtimeMember<Presence = RealtimeObject> = {
2779
+ id: string;
2780
+ screenName: string;
2781
+ presence?: Presence;
2782
+ };
2783
+ type RealtimeCloseReason = "left" | "banned" | "killed" | "rate-limited" | "offline";
2784
+ type RealtimeAskFailure = "no-handler" | "failed";
2785
+ type RealtimeState = "off" | "connecting" | "online" | "offline" | "refused";
2786
+ type RealtimeStatus = {
2787
+ state: RealtimeState;
2788
+ error: string | null;
2789
+ };
2790
+ type RealtimeJoinOptions<Presence extends RealtimeObject = RealtimeObject> = {
2791
+ presence?: Presence | null;
2792
+ };
2793
+ type RealtimeChannelInfo = {
2794
+ id: string;
2795
+ scope: RealtimeScope;
2796
+ name: string | null;
2797
+ part: number | null;
2798
+ you: RealtimeMember;
2799
+ members: RealtimeMember[];
2800
+ state: RealtimeObject | null;
2801
+ host: string | null;
2802
+ hostHidden?: boolean;
2803
+ };
2804
+ type RealtimeMessage<Data = unknown> = {
2805
+ channel: string;
2806
+ from: RealtimeMember;
2807
+ data: Data;
2808
+ at: number;
2809
+ direct: boolean;
2810
+ };
2811
+ type RealtimeMemberEvent = {
2812
+ channel: string;
2813
+ member: RealtimeMember;
2814
+ };
2815
+ type RealtimeStateEvent<State extends RealtimeObject = RealtimeObject> = {
2816
+ channel: string;
2817
+ state: State | null;
2818
+ from: string | null;
2819
+ at: number;
2820
+ };
2821
+ type RealtimePresenceEvent<Presence extends RealtimeObject = RealtimeObject> = {
2822
+ channel: string;
2823
+ member: RealtimeMember<Presence>;
2824
+ };
2825
+ type RealtimeHostEvent<Presence extends RealtimeObject = RealtimeObject> = {
2826
+ channel: string;
2827
+ host: RealtimeMember<Presence> | null;
2828
+ you: boolean;
2829
+ hosted: boolean;
2830
+ };
2831
+ type RealtimeAsk<Question = unknown> = {
2832
+ channel: string;
2833
+ id: string;
2834
+ from: RealtimeMember;
2835
+ data: Question;
2836
+ at: number;
2837
+ };
2838
+ type RealtimeAskOptions = {
2839
+ timeout?: number;
2840
+ };
2841
+ type RealtimeAskReason = "timeout" | "gone" | "closed" | "no-handler" | "failed";
2842
+ declare class RealtimeAskError extends Error {
2843
+ readonly reason: RealtimeAskReason;
2844
+ readonly code: string;
2845
+ constructor(reason: RealtimeAskReason, message: string);
2846
+ }
2847
+ type RealtimeClose = {
2848
+ channel: string;
2849
+ reason: RealtimeCloseReason;
2850
+ message: string;
2851
+ };
2852
+ type RealtimeEvent = ({
2853
+ kind: "join";
2854
+ } & RealtimeMemberEvent) | ({
2855
+ kind: "leave";
2856
+ } & RealtimeMemberEvent) | {
2857
+ kind: "message";
2858
+ message: RealtimeMessage;
2859
+ } | ({
2860
+ kind: "state";
2861
+ } & RealtimeStateEvent) | ({
2862
+ kind: "presence";
2863
+ } & RealtimePresenceEvent) | ({
2864
+ kind: "host";
2865
+ } & RealtimeHostEvent) | ({
2866
+ kind: "close";
2867
+ } & RealtimeClose);
2868
+ type RealtimeLink = {
2869
+ open(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions): Promise<RealtimeChannelInfo>;
2870
+ leave(channel: string): Promise<boolean>;
2871
+ send(channel: string, data: unknown): Promise<void>;
2872
+ sendTo(channel: string, member: string, data: unknown): Promise<void>;
2873
+ setState(channel: string, state: RealtimeObject | null): Promise<void>;
2874
+ setPresence(channel: string, presence: RealtimeObject | null): Promise<void>;
2875
+ giveHost(channel: string, member: string): Promise<void>;
2876
+ ask(channel: string, member: string, data: unknown, options?: RealtimeAskOptions): Promise<unknown>;
2877
+ answer(askId: string, data: unknown): Promise<void>;
2878
+ decline(askId: string, reason?: RealtimeAskFailure): Promise<void>;
2879
+ channels(): RealtimeChannelInfo[];
2880
+ status(): RealtimeStatus;
2881
+ onEvent(listener: (event: RealtimeEvent) => void): Unsubscribe;
2882
+ onAsk(listener: (ask: RealtimeAsk) => void): Unsubscribe;
2883
+ onStatus(listener: (status: RealtimeStatus) => void): Unsubscribe;
2884
+ };
2885
+ type RealtimeCalls = {
2886
+ open(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions): Promise<RealtimeChannelInfo>;
2887
+ leave(channel: string): Promise<boolean>;
2888
+ send(channel: string, data: unknown): Promise<void>;
2889
+ sendTo(channel: string, member: string, data: unknown): Promise<void>;
2890
+ setState(channel: string, state: RealtimeObject | null): Promise<void>;
2891
+ setPresence(channel: string, presence: RealtimeObject | null): Promise<void>;
2892
+ giveHost(channel: string, member: string): Promise<void>;
2893
+ ask(channel: string, member: string, data: unknown, options?: RealtimeAskOptions): Promise<unknown>;
2894
+ answer(askId: string, data: unknown): Promise<void>;
2895
+ decline(askId: string, reason?: RealtimeAskFailure): Promise<void>;
2896
+ onAsk(listener: (ask: RealtimeAsk) => void): Unsubscribe;
2897
+ onMessage(listener: (message: RealtimeMessage) => void): Unsubscribe;
2898
+ onJoin(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
2899
+ onLeave(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
2900
+ onState(listener: (event: RealtimeStateEvent) => void): Unsubscribe;
2901
+ onPresence(listener: (event: RealtimePresenceEvent) => void): Unsubscribe;
2902
+ onHost(listener: (event: RealtimeHostEvent) => void): Unsubscribe;
2903
+ onClose(listener: (event: RealtimeClose) => void): Unsubscribe;
2904
+ };
2905
+ type Heard = {
2906
+ kind: "message";
2907
+ message: RealtimeMessage;
2908
+ } | ({
2909
+ kind: "ask";
2910
+ } & RealtimeAsk) | ({
2911
+ kind: "join" | "leave";
2912
+ } & RealtimeMemberEvent) | ({
2913
+ kind: "state";
2914
+ } & RealtimeStateEvent) | ({
2915
+ kind: "presence";
2916
+ } & RealtimePresenceEvent) | ({
2917
+ kind: "host";
2918
+ } & RealtimeHostEvent) | ({
2919
+ kind: "close";
2920
+ } & RealtimeClose);
2921
+ declare class RealtimeChannel<Data = unknown, State extends RealtimeObject = RealtimeObject, Presence extends RealtimeObject = RealtimeObject> {
2922
+ private readonly calls;
2923
+ readonly id: string;
2924
+ readonly scope: RealtimeScope;
2925
+ readonly name: string | null;
2926
+ readonly part: number | null;
2927
+ private self;
2928
+ private list;
2929
+ private shared;
2930
+ private hostAt;
2931
+ private hostIsHidden;
2932
+ private closedWith;
2933
+ private answers;
2934
+ private readonly heard;
2935
+ private stop;
2936
+ constructor(info: RealtimeChannelInfo, calls: RealtimeCalls);
2937
+ get you(): RealtimeMember<Presence>;
2938
+ get open(): boolean;
2939
+ members(): readonly RealtimeMember<Presence>[];
2940
+ host(): RealtimeMember<Presence> | null;
2941
+ get isHost(): boolean;
2942
+ get hosted(): boolean;
2943
+ giveHost(memberId: string): Promise<void>;
2944
+ state(): State | null;
2945
+ setState(state: State | null): Promise<void>;
2946
+ presence(): Presence | null;
2947
+ setPresence(presence: Presence | null): Promise<void>;
2948
+ send(data: Data): Promise<void>;
2949
+ sendTo(memberId: string, data: Data): Promise<void>;
2950
+ ask<Answer = unknown>(memberId: string, question: unknown, options?: RealtimeAskOptions): Promise<Answer>;
2951
+ onAsk<Question = unknown, Answer = unknown>(handler: (ask: RealtimeAsk<Question>) => Answer | PromiseLike<Answer>): Unsubscribe;
2952
+ leave(): Promise<void>;
2953
+ onMessage(listener: (message: RealtimeMessage<Data>) => void): Unsubscribe;
2954
+ onJoin(listener: (member: RealtimeMember<Presence>) => void): Unsubscribe;
2955
+ onLeave(listener: (member: RealtimeMember<Presence>) => void): Unsubscribe;
2956
+ onState(listener: (event: RealtimeStateEvent<State>) => void): Unsubscribe;
2957
+ onPresence(listener: (member: RealtimeMember<Presence>) => void): Unsubscribe;
2958
+ onHost(listener: (event: RealtimeHostEvent<Presence>) => void): Unsubscribe;
2959
+ onClose(listener: (close: RealtimeClose) => void): Unsubscribe;
2960
+ hear(event: Heard): void;
2961
+ private reply;
2962
+ private turnDown;
2963
+ stopWith(stop: () => void): void;
2964
+ private listen;
2965
+ private tell;
2966
+ private refuse;
2967
+ }
2968
+ declare class RealtimeApi {
2969
+ private readonly link;
2970
+ constructor(game: GameContext);
2971
+ get available(): boolean;
2972
+ get status(): RealtimeStatus;
2973
+ onStatus(listener: (status: RealtimeStatus) => void): Unsubscribe;
2974
+ join<Data = unknown, State extends RealtimeObject = RealtimeObject, Presence extends RealtimeObject = RealtimeObject>(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions<Presence>): Promise<RealtimeChannel<Data, State, Presence>>;
2975
+ open(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions): Promise<RealtimeChannelInfo>;
2976
+ leave(channelId: string): Promise<boolean>;
2977
+ send(channelId: string, data: unknown): Promise<void>;
2978
+ sendTo(channelId: string, memberId: string, data: unknown): Promise<void>;
2979
+ ask(channelId: string, memberId: string, question: unknown, options?: RealtimeAskOptions): Promise<unknown>;
2980
+ answer(askId: string, answer: unknown): Promise<void>;
2981
+ decline(askId: string, reason?: RealtimeAskFailure): Promise<void>;
2982
+ state(channelId: string): RealtimeObject | null;
2983
+ setState(channelId: string, state: RealtimeObject | null): Promise<void>;
2984
+ presence(channelId: string): RealtimeObject | null;
2985
+ setPresence(channelId: string, presence: RealtimeObject | null): Promise<void>;
2986
+ host(channelId: string): RealtimeMember | null;
2987
+ giveHost(channelId: string, memberId: string): Promise<void>;
2988
+ channels(): RealtimeChannelInfo[];
2989
+ members(channelId: string): RealtimeMember[];
2990
+ private channelOf;
2991
+ onMessage(listener: (message: RealtimeMessage) => void): Unsubscribe;
2992
+ onJoin(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
2993
+ onLeave(listener: (event: RealtimeMemberEvent) => void): Unsubscribe;
2994
+ onState(listener: (event: RealtimeStateEvent) => void): Unsubscribe;
2995
+ onPresence(listener: (event: RealtimePresenceEvent) => void): Unsubscribe;
2996
+ onHost(listener: (event: RealtimeHostEvent) => void): Unsubscribe;
2997
+ onAsk(listener: (ask: RealtimeAsk) => void): Unsubscribe;
2998
+ onClose(listener: (event: RealtimeClose) => void): Unsubscribe;
2999
+ private on;
3000
+ private reach;
3001
+ }
3002
+ type GameContext = {
3003
+ flash: FlashBridge;
3004
+ server: Side;
3005
+ client: Side;
3006
+ content?: ContentChannel;
3007
+ community?: CommunityChannel;
3008
+ customRooms?: CustomRoomsChannel;
3009
+ realtime?: RealtimeLink;
3010
+ undo?: (key: string, requests: readonly string[] | null) => void;
3011
+ };
3012
+ type PlayerAchievements = PacketOf<typeof Achievements>;
3013
+ type AchievementDescription = {
3014
+ defId: number;
3015
+ name: string;
3016
+ description: string;
3017
+ type: number;
3018
+ typeName: string;
3019
+ userVarId: number;
3020
+ triggerAmount: number;
3021
+ iconMediaId: number;
3022
+ baseMediaId: number;
3023
+ extraText: string;
3024
+ };
3025
+ type AchievementType = {
3026
+ type: number;
3027
+ name: string;
2383
3028
  };
2384
3029
  type HeldAchievement = {
2385
3030
  defId: number;
@@ -2397,6 +3042,14 @@ type CachedStat = {
2397
3042
  value: number;
2398
3043
  type: number;
2399
3044
  };
3045
+ type EarnAnswer = {
3046
+ defId: number;
3047
+ userVarId: number;
3048
+ asked: number;
3049
+ kept: number;
3050
+ earned: boolean;
3051
+ achievements: AchievementEntry[];
3052
+ };
2400
3053
  type StatChange = {
2401
3054
  userVarId: number;
2402
3055
  value: number;
@@ -2411,17 +3064,21 @@ declare class AchievementsApi {
2411
3064
  private readonly server;
2412
3065
  private readonly values;
2413
3066
  private readonly changeListeners;
3067
+ private readonly statsListeners;
2414
3068
  constructor(game: GameContext);
2415
3069
  stat(userVarId: number): number | null;
2416
3070
  get stats(): ReadonlyMap<number, number>;
2417
3071
  readStat(userVarId: number): Promise<number>;
2418
3072
  refreshStats(timeoutMs?: number): Promise<ReadonlyMap<number, number>>;
2419
3073
  setStat(userVarId: number, value: number, timeoutMs?: number): Promise<StatChange>;
3074
+ earn(defId: number, timeoutMs?: number): Promise<EarnAnswer>;
2420
3075
  of(userName: string, timeoutMs?: number): Promise<PlayerAchievements>;
2421
3076
  onStatChange(listener: (change: StatChange) => void): () => void;
2422
3077
  onAchievement(listener: (achievement: AchievementEntry, change: StatChange) => void): () => void;
2423
3078
  definition(defId: number): Promise<Record<string, FlashValue> | null>;
2424
3079
  definitions(type?: number): Promise<Record<string, FlashValue>>;
3080
+ definitionsByType(): Promise<Record<string, Record<string, FlashValue>[]>>;
3081
+ onStats(listener: (stats: ReadonlyMap<number, number>) => void): () => void;
2425
3082
  hasUnseen(): Promise<boolean>;
2426
3083
  showNew(): Promise<void>;
2427
3084
  onAchievements(listener: (answer: PlayerAchievements) => void): () => void;
@@ -2492,6 +3149,47 @@ type AvatarKindDefinition = {
2492
3149
  availabilityStartTime: number;
2493
3150
  availabilityEndTime: number;
2494
3151
  };
3152
+ type AvatarSummary = {
3153
+ userName: string;
3154
+ uuid: string;
3155
+ perUserAvId: number;
3156
+ avInvId: number;
3157
+ avName: string;
3158
+ avTypeId: number;
3159
+ customAvId: number;
3160
+ colors: AvatarColors;
3161
+ userId: number;
3162
+ enviroTypeFlag: number;
3163
+ };
3164
+ type NewAvatar = {
3165
+ avTypeId: number;
3166
+ nameIds: AvatarNameIds;
3167
+ customAvId?: number;
3168
+ diamondDefId?: number;
3169
+ shopId?: number;
3170
+ };
3171
+ type AdventurePlayer = {
3172
+ userId: number;
3173
+ userName: string;
3174
+ avName: string;
3175
+ isMember: boolean;
3176
+ nameBarData: number;
3177
+ };
3178
+ type HostedGame = {
3179
+ infoText: string;
3180
+ userMessage: string;
3181
+ difficulty: number;
3182
+ severity: number;
3183
+ };
3184
+ type AvatarHosting = {
3185
+ adventure: HostedGame | null;
3186
+ pvp: HostedGame | null;
3187
+ };
3188
+ type AvatarRoomState = {
3189
+ joiningRoom: boolean;
3190
+ inPreviewRoom: boolean;
3191
+ waitingForLanguage: boolean;
3192
+ };
2495
3193
  declare class AvatarApi {
2496
3194
  private readonly flash;
2497
3195
  private readonly client;
@@ -2500,9 +3198,11 @@ declare class AvatarApi {
2500
3198
  private readonly lookupListeners;
2501
3199
  private readonly paintListeners;
2502
3200
  private readonly offered;
2503
- private noClip;
3201
+ private noClipHook;
3202
+ private readonly noClipListeners;
2504
3203
  private grounded;
2505
3204
  private navigator;
3205
+ private readonly nameBars;
2506
3206
  constructor(game: GameContext, flash: PhantomFlash);
2507
3207
  private gridOf;
2508
3208
  private readGrid;
@@ -2513,6 +3213,7 @@ declare class AvatarApi {
2513
3213
  userId(): Promise<number>;
2514
3214
  view(): Promise<FlashHandle>;
2515
3215
  standing(): Promise<AvatarStanding | null>;
3216
+ private standingOfView;
2516
3217
  placeAt(position: Point, options?: {
2517
3218
  instant?: boolean;
2518
3219
  }): Promise<void>;
@@ -2540,6 +3241,7 @@ declare class AvatarApi {
2540
3241
  restoreColors(part: AvatarColorPart): Promise<boolean>;
2541
3242
  pickColor(part: AvatarColorPart, index: number): Promise<boolean>;
2542
3243
  paint(colors: AvatarColors): Promise<boolean>;
3244
+ paintColor(part: AvatarColorPart, index: number): Promise<boolean>;
2543
3245
  act(action: AvatarAction): Promise<void>;
2544
3246
  list(): Promise<OwnListedAvatar[]>;
2545
3247
  switchTo(perUserAvId: number): Promise<boolean>;
@@ -2556,9 +3258,53 @@ declare class AvatarApi {
2556
3258
  setWalkSpeed(times: number): Promise<void>;
2557
3259
  glide(direction: Point | null): Promise<void>;
2558
3260
  setNoClip(on: boolean): Promise<boolean>;
3261
+ private rebuildGrid;
3262
+ get noClip(): boolean;
3263
+ onNoClip(listener: (on: boolean) => void): () => void;
2559
3264
  setAirborne(on: boolean): Promise<boolean>;
2560
3265
  walkPath(points: readonly Point[]): Promise<void>;
2561
3266
  walkThrough(x: number, y: number, options?: WalkThroughOptions): Promise<boolean>;
3267
+ create(animal: NewAvatar): Promise<PacketOf<typeof AvatarAdded>>;
3268
+ buySlot(): Promise<boolean>;
3269
+ createFirst(avTypeId: number, nameIds: AvatarNameIds): Promise<boolean>;
3270
+ chooseUsable(avInvIds: readonly number[]): Promise<boolean>;
3271
+ setPendingFlag(flag: number): Promise<void>;
3272
+ canPayForPhoto(): Promise<boolean>;
3273
+ payForPhoto(): Promise<number>;
3274
+ definitionsLoaded(): Promise<boolean>;
3275
+ loadDefinitions(): Promise<boolean>;
3276
+ data(userName: string, perUserAvId: number, timeoutMs?: number): Promise<AvatarSummary>;
3277
+ private loadAvatar;
3278
+ private calledBack;
3279
+ private summarise;
3280
+ private summaryOf;
3281
+ inRoom(userId: number): Promise<AvatarSummary | null>;
3282
+ findInRoom(query: {
3283
+ userName: string;
3284
+ perUserAvId?: number;
3285
+ } | {
3286
+ avName: string;
3287
+ }): Promise<AvatarSummary | null>;
3288
+ standingOf(userId: number): Promise<AvatarStanding | null>;
3289
+ defaultLook(avTypeId: number, custom?: boolean): Promise<AvatarSummary | null>;
3290
+ buddyCardAvatar(): Promise<AvatarSummary | null>;
3291
+ adventurePlayers(): Promise<AdventurePlayer[]>;
3292
+ offScreenPlayers(): Promise<number[]>;
3293
+ lastSeenAt(userId: number, roomName?: string): Promise<Point | null>;
3294
+ hosting(): Promise<AvatarHosting>;
3295
+ isHostingAdventure(): Promise<boolean>;
3296
+ suitsEnvironment(enviroType: number): Promise<boolean>;
3297
+ roomState(): Promise<AvatarRoomState>;
3298
+ lastNameBar(userId: number): number | null;
3299
+ onList(listener: (list: PacketOf<typeof AvatarList>) => void): () => void;
3300
+ onRemoved(listener: (result: PacketOf<typeof AvatarKilled>) => void): () => void;
3301
+ onAdded(listener: (added: PacketOf<typeof AvatarAdded>) => void): () => void;
3302
+ onSlotBought(listener: (result: PacketOf<typeof AvatarSlotBought>) => void): () => void;
3303
+ onFirstCreated(listener: (result: PacketOf<typeof AvatarFastPassAdded>) => void): () => void;
3304
+ onNameBarChange(listener: (change: PacketOf<typeof AvatarNameBarChanged>) => void): () => void;
3305
+ onUsableChosen(listener: (result: PacketOf<typeof AvatarOrdained>) => void): () => void;
3306
+ onPhotoChecked(listener: (result: PacketOf<typeof AvatarPhotoChecked>) => void): () => void;
3307
+ onPhotoTaken(listener: (result: PacketOf<typeof AvatarPhotoTaken>) => void): () => void;
2562
3308
  }
2563
3309
  type AdventurePrizeKind = "denItem" | "clothing" | "gems" | "crystals";
2564
3310
  type AdventureActorPrize = {
@@ -2814,6 +3560,83 @@ type SpawnActorOptions = {
2814
3560
  skipIfTaken?: boolean;
2815
3561
  parameters?: string;
2816
3562
  };
3563
+ type AdventureExperience = PacketOf<typeof QuestXp>;
3564
+ type AdventureDeparture = {
3565
+ userId: number;
3566
+ avatarName: string;
3567
+ };
3568
+ type AdventureAward = {
3569
+ userVarId: number;
3570
+ value: number;
3571
+ };
3572
+ type AdventureSeek = {
3573
+ seekType: number;
3574
+ userId: number;
3575
+ };
3576
+ type AdventureSeed = {
3577
+ defId: number;
3578
+ count: number;
3579
+ max: number;
3580
+ };
3581
+ type AdventurePlant = {
3582
+ actorId: string;
3583
+ defId: number | null;
3584
+ position: Point | null;
3585
+ userName: string | null;
3586
+ launcherUserId: number | null;
3587
+ eaten: string[];
3588
+ recoils: number;
3589
+ };
3590
+ type AdventureCombatStats = PacketOf<typeof QuestStatsUpdate>;
3591
+ type AdventureAttack = {
3592
+ userId: number;
3593
+ weaponDefId: number;
3594
+ color: number;
3595
+ };
3596
+ type AdventurePlayerRoom = {
3597
+ roomName: string;
3598
+ position: Point;
3599
+ };
3600
+ type AdventureSoundCue = {
3601
+ name: string;
3602
+ voiceOver: boolean;
3603
+ subtitle: string | null;
3604
+ };
3605
+ type AdventureZap = {
3606
+ kind: "beam" | "phantom";
3607
+ actorId: string;
3608
+ userId: number;
3609
+ };
3610
+ type AdventureLaunch = {
3611
+ ranged: boolean;
3612
+ weaponDefId: number;
3613
+ target: Point;
3614
+ color: number;
3615
+ };
3616
+ type AdventureSoundPack = {
3617
+ mediaId: number;
3618
+ };
3619
+ type AdventureActorMove = {
3620
+ position: Point;
3621
+ velocity: number;
3622
+ seekType: number;
3623
+ nearest: Point;
3624
+ };
3625
+ type AdventureWeaponLaunch = {
3626
+ weaponDefId: number;
3627
+ target: Point;
3628
+ color: number;
3629
+ };
3630
+ type AdventureClientStatus = {
3631
+ justJoined: boolean;
3632
+ exitPending: boolean;
3633
+ likeNormalRoom: boolean;
3634
+ playAsPet: boolean;
3635
+ joinableAfterStart: boolean;
3636
+ throwKeyDown: boolean;
3637
+ crystalCount: number;
3638
+ maxGoals: number;
3639
+ };
2817
3640
  declare class AdventuresApi {
2818
3641
  readonly [STATE_FIELDS]: readonly [
2819
3642
  "lobbyState",
@@ -2823,7 +3646,38 @@ declare class AdventuresApi {
2823
3646
  "roomName",
2824
3647
  "rewardsOffered",
2825
3648
  "endReason",
2826
- "crystalCount"
3649
+ "crystalCount",
3650
+ "experienceState",
3651
+ "levelByUser",
3652
+ "departed",
3653
+ "defeatedUserIds",
3654
+ "awardList",
3655
+ "givenItemIds",
3656
+ "exitAnswered",
3657
+ "lastBundleMessages",
3658
+ "iconByActor",
3659
+ "seekByActor",
3660
+ "disguiseByUser",
3661
+ "seedsByDef",
3662
+ "plantByActor",
3663
+ "combatState",
3664
+ "volumeByActor",
3665
+ "attackByActor",
3666
+ "roomByUser",
3667
+ "sideScrollByUser",
3668
+ "actorTorches",
3669
+ "playerTorches",
3670
+ "musicName",
3671
+ "cutsceneMedia",
3672
+ "preloadedMedia",
3673
+ "soundPackIds",
3674
+ "screenFadedOut",
3675
+ "lastZapState",
3676
+ "launchBy",
3677
+ "respawnsGrantedCount",
3678
+ "shakeUntil",
3679
+ "lastSoundCue",
3680
+ "pageViewList"
2827
3681
  ];
2828
3682
  private readonly flash;
2829
3683
  private readonly navigator;
@@ -2849,6 +3703,37 @@ declare class AdventuresApi {
2849
3703
  private readonly loops;
2850
3704
  private nextLoop;
2851
3705
  private nextSwing;
3706
+ private experienceState;
3707
+ private readonly levelByUser;
3708
+ private readonly departed;
3709
+ private readonly defeatedUserIds;
3710
+ private readonly awardList;
3711
+ private readonly givenItemIds;
3712
+ private exitAnswered;
3713
+ private lastBundleMessages;
3714
+ private readonly iconByActor;
3715
+ private readonly seekByActor;
3716
+ private readonly disguiseByUser;
3717
+ private readonly seedsByDef;
3718
+ private readonly plantByActor;
3719
+ private combatState;
3720
+ private readonly volumeByActor;
3721
+ private readonly attackByActor;
3722
+ private readonly roomByUser;
3723
+ private readonly sideScrollByUser;
3724
+ private readonly actorTorches;
3725
+ private readonly playerTorches;
3726
+ private musicName;
3727
+ private cutsceneMedia;
3728
+ private readonly preloadedMedia;
3729
+ private readonly soundPackIds;
3730
+ private screenFadedOut;
3731
+ private lastZapState;
3732
+ private readonly launchBy;
3733
+ private respawnsGrantedCount;
3734
+ private shakeUntil;
3735
+ private lastSoundCue;
3736
+ private readonly pageViewList;
2852
3737
  constructor(game: GameContext);
2853
3738
  get lobby(): AdventureLobby | null;
2854
3739
  get current(): Adventure | null;
@@ -3005,6 +3890,95 @@ declare class AdventuresApi {
3005
3890
  onSeedPlanted(listener: (planted: PacketOf<typeof QuestSeedPlanted>) => void): () => void;
3006
3891
  onPlantAte(listener: (ate: PacketOf<typeof QuestPlantAte>) => void): () => void;
3007
3892
  onPlantEatRecoil(listener: (recoil: PacketOf<typeof QuestPlantEatRecoil>) => void): () => void;
3893
+ experience(): AdventureExperience | null;
3894
+ playerLevel(userId: number): number | null;
3895
+ departedPlayers(): AdventureDeparture[];
3896
+ defeatedPlayers(): number[];
3897
+ awards(): AdventureAward[];
3898
+ givenItems(): string[];
3899
+ get exitConfirmed(): boolean;
3900
+ lastBundle(): QuestBundledMessage[];
3901
+ actorIconShowing(actorId: string): boolean | null;
3902
+ actorSeeking(actorId: string): AdventureSeek | null;
3903
+ disguise(userId: number): number | null;
3904
+ seeds(): AdventureSeed[];
3905
+ plants(): AdventurePlant[];
3906
+ combatStats(): AdventureCombatStats | null;
3907
+ volumeProgress(actorId: string): number | null;
3908
+ attackTarget(actorId: string): AdventureAttack | null;
3909
+ playerRoom(userId: number): AdventurePlayerRoom | null;
3910
+ sideScrollPosition(userId: number): Point | null;
3911
+ actorTorch(actorId: string): boolean | null;
3912
+ playerTorch(userId: number): boolean | null;
3913
+ get music(): string | null;
3914
+ get cutscene(): number | null;
3915
+ preloadedCutscenes(): number[];
3916
+ soundPacks(): number[];
3917
+ get screenFaded(): boolean;
3918
+ lastZap(): AdventureZap | null;
3919
+ lastLaunch(by: number | string): AdventureLaunch | null;
3920
+ get respawnsGranted(): number;
3921
+ get shaking(): boolean;
3922
+ lastSound(): AdventureSoundCue | null;
3923
+ pageViews(): string[];
3924
+ clientStatus(): Promise<AdventureClientStatus>;
3925
+ actorPathToPlayer(actorId: string): Promise<boolean>;
3926
+ onActorSpawned(listener: (spawned: PacketOf<typeof QuestActorSpawned>) => void): () => void;
3927
+ onActorMoved(listener: (moved: PacketOf<typeof QuestActorMoved>) => void): () => void;
3928
+ onActorHealth(listener: (health: PacketOf<typeof QuestActorHealth>) => void): () => void;
3929
+ onActorDied(listener: (died: PacketOf<typeof QuestActorDied>) => void): () => void;
3930
+ onActorRestored(listener: (restored: PacketOf<typeof QuestActorRestored>) => void): () => void;
3931
+ onActorSwfState(listener: (state: PacketOf<typeof QuestActorSwfState>) => void): () => void;
3932
+ onActorPath(listener: (path: PacketOf<typeof QuestActorPath>) => void): () => void;
3933
+ onCommand(listener: (command: PacketOf<typeof QuestCommand>) => void): () => void;
3934
+ onVariable(listener: (variable: PacketOf<typeof QuestVariable>) => void): () => void;
3935
+ onPickUpResult(listener: (result: AdventurePickUpAnswer) => void): () => void;
3936
+ onMovedItems(listener: (moved: PacketOf<typeof QuestMovedItems>) => void): () => void;
3937
+ onCrystalCount(listener: (count: PacketOf<typeof QuestCrystals>) => void): () => void;
3938
+ onSentOut(listener: (sent: PacketOf<typeof QuestExitByType>) => void): () => void;
3939
+ onLobbyWaiting(listener: (waiting: PacketOf<typeof QuestWaiting>) => void): () => void;
3940
+ onLobbyLeft(listener: (left: PacketOf<typeof QuestJoinCancelled>) => void): () => void;
3941
+ onPlayerAttacked(listener: (attack: PacketOf<typeof QuestPlayerAttacked>) => void): () => void;
3942
+ onBeamZap(listener: (zap: PacketOf<typeof QuestBeamZapped>) => void): () => void;
3943
+ onPhantomZap(listener: (zap: PacketOf<typeof QuestPhantomZapped>) => void): () => void;
3944
+ onThrow(listener: (thrown: PacketOf<typeof QuestProjectileLaunched>) => void): () => void;
3945
+ onSwing(listener: (swung: PacketOf<typeof QuestSwiped>) => void): () => void;
3946
+ onRespawnGranted(listener: (granted: PacketOf<typeof QuestRespawnGranted>) => void): () => void;
3947
+ onPlayerRoomChange(listener: (change: PacketOf<typeof QuestPlayerRoomChange>) => void): () => void;
3948
+ onSideScroll(listener: (moved: PacketOf<typeof QuestSideScrollMoved>) => void): () => void;
3949
+ onTorch(listener: (torch: PacketOf<typeof QuestTorch>) => void): () => void;
3950
+ onCutscene(listener: (film: PacketOf<typeof QuestPlaySwf>) => void): () => void;
3951
+ onCutscenePreload(listener: (film: PacketOf<typeof QuestPreloadSwf>) => void): () => void;
3952
+ onFade(listener: (fade: PacketOf<typeof QuestFade>) => void): () => void;
3953
+ onShake(listener: (shake: PacketOf<typeof QuestShake>) => void): () => void;
3954
+ onSound(listener: (sound: AdventureSoundCue) => void): () => void;
3955
+ onMusic(listener: (music: PacketOf<typeof QuestMusic>) => void): () => void;
3956
+ onSoundPack(listener: (pack: AdventureSoundPack) => void): () => void;
3957
+ onPageView(listener: (view: PacketOf<typeof QuestPostUri>) => void): () => void;
3958
+ reportHit(actorId: string, weaponDefId: number, at: Point): Promise<void>;
3959
+ reportPlayerHit(weaponDefId: number): Promise<void>;
3960
+ reportAttackOnPlayer(actorId: string, userId: number, weaponDefId: number, color: number): Promise<void>;
3961
+ reportActorPosition(actorId: string, move: AdventureActorMove): Promise<void>;
3962
+ requestActorSeek(actorId: string, seekType: number): Promise<void>;
3963
+ untrigger(actorId: string): Promise<void>;
3964
+ reportBeamZap(actorId: string): Promise<void>;
3965
+ reportPhantomZap(actorId: string, at?: Point): Promise<void>;
3966
+ reportDestructibleHit(phantomActorId: string, destructibleActorId: string): Promise<void>;
3967
+ reportPlantAte(plantActorId: string, phantomActorId?: string): Promise<void>;
3968
+ reportThrow({ weaponDefId, target, color }: AdventureWeaponLaunch): Promise<void>;
3969
+ reportSwing({ weaponDefId, target, color }: AdventureWeaponLaunch): Promise<void>;
3970
+ finishCutscene(): Promise<void>;
3971
+ movedItems(timeoutMs?: number): Promise<PacketOf<typeof QuestMovedItems>>;
3972
+ requestRespawn(at?: Point): Promise<void>;
3973
+ finishMinigame(result: number, from?: {
3974
+ actorName: string;
3975
+ actorState: number;
3976
+ }): Promise<void>;
3977
+ finishRoomMinigame(roomName: string, result: number): Promise<void>;
3978
+ reportSideScroll(at: Point, flags?: number): Promise<void>;
3979
+ private forgetRun;
3980
+ private plantOf;
3981
+ private respawnPoint;
3008
3982
  private targetOf;
3009
3983
  private manager;
3010
3984
  }
@@ -3047,6 +4021,17 @@ declare class AssetsApi {
3047
4021
  loadMedia(mediaId: number, timeoutMs?: number): Promise<LoadedMediaInfo>;
3048
4022
  onLoaded(listener: (asset: LoadedAsset) => void): Unsubscribe;
3049
4023
  }
4024
+ type BuddySighting = {
4025
+ userName: string;
4026
+ online: boolean;
4027
+ roomName: string;
4028
+ displayName: string;
4029
+ displayNameId: number;
4030
+ otherServer: boolean;
4031
+ node: string | null;
4032
+ locked: boolean;
4033
+ seenAt: number;
4034
+ };
3050
4035
  type Buddy = BuddyEntry;
3051
4036
  type BuddyUpdate = {
3052
4037
  type: "added" | "removed" | "online" | "offline" | "renamed" | "updated";
@@ -3076,6 +4061,23 @@ type SentBuddyRequest = {
3076
4061
  expiresAt: number;
3077
4062
  accepting: boolean;
3078
4063
  };
4064
+ type IncomingBuddyRequest = {
4065
+ userName: string;
4066
+ userNameModerationFlag: number;
4067
+ receivedAt: number;
4068
+ expiresAt: number;
4069
+ };
4070
+ type BuddyBlockChange = {
4071
+ userName: string;
4072
+ blocked: boolean;
4073
+ success: boolean;
4074
+ };
4075
+ type BuddyCardTradeItem = {
4076
+ defId: number;
4077
+ invIdx: number;
4078
+ itemType: number;
4079
+ name: string;
4080
+ };
3079
4081
  type BuddyWhereabouts = {
3080
4082
  roomName: string;
3081
4083
  displayName: string;
@@ -3086,21 +4088,30 @@ type BuddyWhereabouts = {
3086
4088
  declare class BuddiesApi {
3087
4089
  readonly [STATE_FIELDS]: readonly [
3088
4090
  "buddies",
3089
- "blockedNames"
4091
+ "blockedNames",
4092
+ "incoming"
3090
4093
  ];
3091
4094
  private readonly flash;
3092
4095
  private readonly server;
3093
4096
  private readonly buddies;
3094
4097
  private readonly blockedNames;
4098
+ private readonly incoming;
3095
4099
  private readonly listeners;
3096
4100
  private readonly locationListeners;
3097
4101
  private readonly blockInfoListeners;
4102
+ private readonly sightings;
4103
+ private readonly sightingListeners;
4104
+ private readonly asked;
3098
4105
  constructor(game: GameContext);
4106
+ get whereabouts(): BuddySighting[];
4107
+ whereaboutsOf(userName: string): BuddySighting | null;
4108
+ onWhereabouts(listener: (sighting: BuddySighting) => void): Unsubscribe;
3099
4109
  get list(): Buddy[];
3100
4110
  get online(): Buddy[];
3101
4111
  get blocked(): string[];
3102
4112
  get(userName: string): Buddy | null;
3103
4113
  isBlocked(userName: string): boolean;
4114
+ get requests(): IncomingBuddyRequest[];
3104
4115
  refresh(timeoutMs?: number): Promise<Buddy[]>;
3105
4116
  add(userName: string): Promise<void>;
3106
4117
  remove(userName: string): Promise<void>;
@@ -3113,11 +4124,18 @@ declare class BuddiesApi {
3113
4124
  onUpdate(listener: (update: BuddyUpdate) => void): Unsubscribe;
3114
4125
  onLocation(listener: (location: PacketOf<typeof BuddyLocation>) => void): Unsubscribe;
3115
4126
  onBlockInfo(listener: (info: PacketOf<typeof BuddyBlockInfo>) => void): Unsubscribe;
4127
+ onAddResult(listener: (result: PacketOf<typeof BuddyAddResult>) => void): Unsubscribe;
4128
+ onBlockChange(listener: (change: BuddyBlockChange) => void): Unsubscribe;
4129
+ onList(listener: (list: PacketOf<typeof BuddyList>) => void): Unsubscribe;
3116
4130
  private fromStatus;
3117
4131
  isBlockingMe(userName: string, timeoutMs?: number): Promise<boolean>;
3118
4132
  capacity(): Promise<BuddyCapacity>;
3119
4133
  knows(userName: string): Promise<boolean>;
3120
4134
  details(userName: string): Promise<BuddyDetails | null>;
4135
+ clientList(): Promise<BuddyDetails[]>;
4136
+ clientBlocked(): Promise<string[]>;
4137
+ hasBlocked(userName: string): Promise<boolean>;
4138
+ cardTradeList(): Promise<BuddyCardTradeItem[] | null>;
3121
4139
  showCard(userName: string, online?: boolean): Promise<void>;
3122
4140
  closeCard(): Promise<void>;
3123
4141
  joinBuddyQuest(): Promise<boolean>;
@@ -3154,12 +4172,16 @@ type ModerationEvent = {
3154
4172
  };
3155
4173
  declare class ChatApi {
3156
4174
  readonly [STATE_FIELDS]: readonly [
3157
- "history"
4175
+ "history",
4176
+ "adminNotice",
4177
+ "moderationNotice"
3158
4178
  ];
3159
4179
  private readonly flash;
3160
4180
  private readonly server;
3161
4181
  private readonly history;
3162
4182
  private readonly listeners;
4183
+ private adminNotice;
4184
+ private moderationNotice;
3163
4185
  constructor(game: GameContext);
3164
4186
  get recent(): readonly ChatMessage[];
3165
4187
  say(text: string): Promise<void>;
@@ -3185,7 +4207,18 @@ declare class ChatApi {
3185
4207
  log(text: string, from?: string): Promise<void>;
3186
4208
  clearLog(): Promise<void>;
3187
4209
  onJamAGram(listener: (card: JamAGram) => void): Unsubscribe;
3188
- }
4210
+ get lastAdminMessage(): AdminNotice | null;
4211
+ get lastModeration(): ModerationEvent | null;
4212
+ private phraseNodes;
4213
+ }
4214
+ declare const DIAMOND_TYPE: {
4215
+ readonly item: 0;
4216
+ readonly denItem: 1;
4217
+ readonly pet: 2;
4218
+ readonly avatar: 3;
4219
+ readonly den: 4;
4220
+ };
4221
+ type DiamondType = keyof typeof DIAMOND_TYPE;
3189
4222
  type CurrencyKey = CurrencyKind | number;
3190
4223
  type CurrencyChange = {
3191
4224
  currency: number;
@@ -3241,6 +4274,8 @@ declare class CurrencyApi {
3241
4274
  exchangeDefinition(defId: number): Promise<CurrencyExchangeDefinition | null>;
3242
4275
  exchange(shopId: number, exchangeDefId: number, timeoutMs?: number): Promise<ExchangeResult>;
3243
4276
  canAfford(price: number | string, currency?: CurrencyKey): Promise<boolean>;
4277
+ diamondsLoaded(): Promise<boolean>;
4278
+ diamondDefinitionId(refDefId: number, type: DiamondType | number): Promise<number | null>;
3244
4279
  onChange(listener: (change: CurrencyChange) => void): () => void;
3245
4280
  onExchange(listener: (result: ExchangeResult) => void): () => void;
3246
4281
  onDonate(listener: (success: boolean) => void): () => void;
@@ -3257,9 +4292,10 @@ type OpenDailyGift = {
3257
4292
  };
3258
4293
  declare class DailyGiftApi {
3259
4294
  private readonly flash;
4295
+ private readonly client;
3260
4296
  private readonly giftListeners;
3261
4297
  private statUserVarId;
3262
- constructor(game: GameContext);
4298
+ constructor(game: GameContext, flash: PhantomFlash);
3263
4299
  daysInCycle(): Promise<number>;
3264
4300
  statId(): Promise<number>;
3265
4301
  received(): Promise<number>;
@@ -3271,6 +4307,12 @@ declare class DailyGiftApi {
3271
4307
  reject(): Promise<void>;
3272
4308
  close(): Promise<void>;
3273
4309
  onGift(listener: (received: number) => void): Unsubscribe;
4310
+ unwrap(): Promise<void>;
4311
+ onOpen(listener: () => void): Unsubscribe;
4312
+ wheelOpen(): Promise<boolean>;
4313
+ spinWheel(): Promise<boolean>;
4314
+ onWheelOpen(listener: () => void): Unsubscribe;
4315
+ private hookExit;
3274
4316
  private press;
3275
4317
  private popup;
3276
4318
  }
@@ -3338,9 +4380,12 @@ declare const OWN_POPUPS: {
3338
4380
  readonly emailConfirmation: "_emailConfirmation";
3339
4381
  };
3340
4382
  type OwnPopupName = keyof typeof OWN_POPUPS;
4383
+ type LoginPopup = "newspaper" | "holidayBanner" | "adoptAPetIntro";
3341
4384
  declare class PopupsApi {
3342
4385
  private readonly flash;
3343
4386
  private readonly client;
4387
+ private readonly loginSkips;
4388
+ private readonly skippedListeners;
3344
4389
  constructor(game: GameContext, flash: PhantomFlash);
3345
4390
  list(): Promise<Popup[]>;
3346
4391
  read(match?: string): Promise<Popup | null>;
@@ -3349,6 +4394,11 @@ declare class PopupsApi {
3349
4394
  onClose(listener: (popup: PopupClosed) => void): () => void;
3350
4395
  isOpen(popup: OwnPopupName): Promise<boolean>;
3351
4396
  close(popup: OwnPopupName): Promise<boolean>;
4397
+ skipAtLogin(popups?: readonly LoginPopup[]): Promise<LoginPopup[]>;
4398
+ stopSkippingAtLogin(): Promise<void>;
4399
+ get skippingAtLogin(): LoginPopup[];
4400
+ onSkipped(listener: (popup: LoginPopup) => void): () => void;
4401
+ private skipLoginPopup;
3352
4402
  private ownPopup;
3353
4403
  private describe;
3354
4404
  private textOf;
@@ -3417,6 +4467,10 @@ type DenShopPurchase = {
3417
4467
  currency: DenShopCurrency;
3418
4468
  balance: number;
3419
4469
  };
4470
+ type DenShopOfferingEvent = DenShopContents & {
4471
+ ownerUserName: string | null;
4472
+ ok: boolean;
4473
+ };
3420
4474
  type DenShopPurchaseEvent = {
3421
4475
  status: number;
3422
4476
  ownerUserName: string;
@@ -3426,21 +4480,75 @@ type DenShopPurchaseEvent = {
3426
4480
  currency: DenShopCurrency | null;
3427
4481
  balance: number | null;
3428
4482
  };
4483
+ type DenShopSale = {
4484
+ storeInvId: number;
4485
+ item: DenShopItem;
4486
+ defId: number;
4487
+ cost: number;
4488
+ currency: DenShopCurrency;
4489
+ balance: number;
4490
+ };
4491
+ type DenShopStand = {
4492
+ ownerUserName: string;
4493
+ storeInvId: number;
4494
+ defId: number;
4495
+ };
4496
+ type DenShopUpdate = {
4497
+ list?: Array<{
4498
+ item: DenShopItem;
4499
+ cost: number;
4500
+ currency?: DenShopCurrency;
4501
+ }>;
4502
+ unlist?: DenShopItem[];
4503
+ };
3429
4504
  declare class DenShopApi {
3430
4505
  private readonly flash;
3431
4506
  private readonly server;
4507
+ private readonly asked;
4508
+ private readonly offeringListeners;
4509
+ private telling;
3432
4510
  constructor(game: GameContext);
3433
4511
  offering(userName: string, storeInvId: number, timeoutMs?: number): Promise<DenShopContents>;
3434
4512
  list(storeInvId: number, state: string, item: DenShopItem, cost: number, currency?: DenShopCurrency, timeoutMs?: number): Promise<DenShopChange>;
3435
4513
  reprice(storeInvId: number, state: string, item: DenShopItem, cost: number, currency?: DenShopCurrency, timeoutMs?: number): Promise<DenShopChange>;
3436
4514
  unlist(storeInvId: number, state: string, item: DenShopItem, timeoutMs?: number): Promise<DenShopChange>;
3437
4515
  buy(ownerUserName: string, storeInvId: number, state: string, listing: DenShopListing, timeoutMs?: number): Promise<DenShopPurchase>;
4516
+ onOffering(listener: (offering: DenShopOfferingEvent) => void): Unsubscribe;
4517
+ private offeringOf;
3438
4518
  onChange(listener: (change: DenShopChange) => void): Unsubscribe;
3439
4519
  onBuy(listener: (purchase: DenShopPurchaseEvent) => void): Unsubscribe;
3440
- private update;
4520
+ onSale(listener: (sale: DenShopSale) => void): Unsubscribe;
4521
+ inDen(): Promise<DenShopStand[]>;
4522
+ update(storeInvId: number, state: string, { list, unlist }: DenShopUpdate, timeoutMs?: number): Promise<DenShopChange>;
4523
+ private isMe;
4524
+ private send;
3441
4525
  private myShopItem;
3442
4526
  }
3443
4527
  type DenVisitors = Omit<PacketOf<typeof DenVisitorCount>, "room">;
4528
+ type DenVisit = {
4529
+ userName: string;
4530
+ entering: boolean;
4531
+ count: number;
4532
+ home: boolean;
4533
+ at: number;
4534
+ };
4535
+ type DenGuest = {
4536
+ userId: number;
4537
+ userName: string;
4538
+ avatarName: string;
4539
+ uuid: string;
4540
+ arrivedAt: number;
4541
+ alreadyHere: boolean;
4542
+ };
4543
+ type DenGuestLeft = DenGuest & {
4544
+ leftAt: number;
4545
+ };
4546
+ type DenPlacement = {
4547
+ placed: number;
4548
+ limit: number;
4549
+ warningAt: number;
4550
+ ownDen: boolean;
4551
+ };
3444
4552
  type DenPlacedItem = {
3445
4553
  defId: number;
3446
4554
  invIdx: number;
@@ -3511,17 +4619,114 @@ type EcoState = {
3511
4619
  unredeemedEcoCredits: number;
3512
4620
  secondsUntilNextEcoCredit: number;
3513
4621
  };
4622
+ type DenPurchaseAnswer = DenPurchase & {
4623
+ currencyType: number;
4624
+ };
4625
+ type DenSale = {
4626
+ invIdxs: number[];
4627
+ gems: number | null;
4628
+ };
4629
+ type DenEcoConsumers = {
4630
+ ecoPointsConsumed: number;
4631
+ ecoScore: number;
4632
+ consumers: DenEcoConsumer[];
4633
+ };
4634
+ type DenEcoRedemption = {
4635
+ redeemed: boolean;
4636
+ secondsUntilNextEcoCredit: number | null;
4637
+ };
4638
+ type DenPhantomChange = {
4639
+ userId: number;
4640
+ phantom: boolean;
4641
+ };
4642
+ type DenOwnedItems = {
4643
+ activeDenIdx: number;
4644
+ items: DenOwnedItem[];
4645
+ petsInDen: number[];
4646
+ };
4647
+ type DenServerState = {
4648
+ forceReload: boolean;
4649
+ items: DenStateEntry[];
4650
+ pets: DenStatePet[];
4651
+ };
4652
+ type DenItemSave = {
4653
+ invIdx: number;
4654
+ refId?: number;
4655
+ placed?: boolean;
4656
+ x?: number;
4657
+ y?: number;
4658
+ flipped?: number;
4659
+ userNameLink?: string;
4660
+ };
4661
+ type HeldDenShop = {
4662
+ storeInvId: number;
4663
+ state: string;
4664
+ listings: HeldDenShopListing[];
4665
+ };
4666
+ type HeldDenShopListing = {
4667
+ itemType: number;
4668
+ invIdx: number;
4669
+ defId: number;
4670
+ cost: number;
4671
+ currencyType: number;
4672
+ shopInvIdx: number;
4673
+ };
4674
+ type DenRoomChange = {
4675
+ denRoomDefId: number;
4676
+ perUserAvId: number | null;
4677
+ activePetInvId: number | null;
4678
+ };
3514
4679
  declare class DensApi {
3515
4680
  readonly [STATE_FIELDS]: readonly [
3516
- "visitorCount"
4681
+ "visitorCount",
4682
+ "ownName",
4683
+ "home",
4684
+ "guestsById",
4685
+ "roomChangeHeard",
4686
+ "kickedAtHeard",
4687
+ "purchaseHeard",
4688
+ "saleHeard",
4689
+ "emptiedAtHeard",
4690
+ "ecoStateHeard",
4691
+ "ecoRedemptionHeard",
4692
+ "ecoConsumerStates",
4693
+ "activeDenIdxHeard",
4694
+ "stateHeard"
3517
4695
  ];
3518
4696
  private visitorCount;
3519
4697
  private readonly visitorListeners;
4698
+ private readonly visitListeners;
3520
4699
  private readonly kickListeners;
4700
+ private ownName;
4701
+ private home;
4702
+ private readonly guestsById;
4703
+ private guestWork;
4704
+ private settlingSince;
4705
+ private readonly arriveListeners;
4706
+ private readonly leaveListeners;
4707
+ private readonly homeListeners;
3521
4708
  private readonly flash;
3522
4709
  private readonly client;
3523
4710
  private readonly server;
4711
+ private readonly clientSide;
4712
+ private roomChangeHeard;
4713
+ private kickedAtHeard;
4714
+ private purchaseHeard;
4715
+ private saleHeard;
4716
+ private emptiedAtHeard;
4717
+ private ecoStateHeard;
4718
+ private ecoRedemptionHeard;
4719
+ private readonly ecoConsumerStates;
4720
+ private activeDenIdxHeard;
4721
+ private stateHeard;
4722
+ private readonly specialTypes;
4723
+ private defWork;
3524
4724
  constructor(game: GameContext, flash: PhantomFlash);
4725
+ get inOwnDen(): boolean;
4726
+ get guests(): readonly DenGuest[];
4727
+ onGuestArrive(listener: (guest: DenGuest) => void): Unsubscribe;
4728
+ onGuestLeave(listener: (guest: DenGuestLeft) => void): Unsubscribe;
4729
+ onOwnDen(listener: (inside: boolean) => void): Unsubscribe;
3525
4730
  join(owner: string): Promise<void>;
3526
4731
  joinOwn(): Promise<void>;
3527
4732
  isOwnDen(): Promise<boolean>;
@@ -3532,6 +4737,7 @@ declare class DensApi {
3532
4737
  switchRoom(invIdx: number): Promise<void>;
3533
4738
  get visitors(): DenVisitors | null;
3534
4739
  onVisitors(listener: (visitors: DenVisitors) => void): () => void;
4740
+ onVisit(listener: (visit: DenVisit) => void): Unsubscribe;
3535
4741
  onKicked(listener: () => void): () => void;
3536
4742
  onEntered(listener: (den: {
3537
4743
  ownerName: string;
@@ -3570,6 +4776,7 @@ declare class DensApi {
3570
4776
  ecoScore: number;
3571
4777
  }>;
3572
4778
  items(): Promise<DenPlacedItem[]>;
4779
+ placement(): Promise<DenPlacement | null>;
3573
4780
  moveItem(item: Pick<DenPlacedItem, "refId" | "invIdx">, placement: DenItemPlacement): Promise<boolean>;
3574
4781
  inventory(timeoutMs?: number): Promise<DenInventoryItem[]>;
3575
4782
  itemDefinition(defId: number): Promise<DenItemDefinition | null>;
@@ -3584,13 +4791,54 @@ declare class DensApi {
3584
4791
  recycleItems(...invIdxs: number[]): Promise<number[]>;
3585
4792
  empty(): Promise<void>;
3586
4793
  saveLayout(): Promise<void>;
4794
+ get roomChange(): DenRoomChange | null;
4795
+ get kickedAt(): number | null;
4796
+ get lastPurchase(): DenPurchaseAnswer | null;
4797
+ onPurchase(listener: (purchase: DenPurchaseAnswer) => void): Unsubscribe;
4798
+ get lastSale(): DenSale | null;
4799
+ onSale(listener: (sale: DenSale) => void): Unsubscribe;
4800
+ get emptiedAt(): number | null;
4801
+ onEmptied(listener: () => void): Unsubscribe;
4802
+ epicDens(timeoutMs?: number): Promise<string[]>;
4803
+ onEpicDens(listener: (userNames: string[]) => void): Unsubscribe;
4804
+ setPhantom(phantom: boolean, timeoutMs?: number): Promise<DenPhantomChange | null>;
4805
+ onPhantom(listener: (change: DenPhantomChange) => void): Unsubscribe;
4806
+ get lastEcoState(): EcoState | null;
4807
+ onEcoState(listener: (state: EcoState) => void): Unsubscribe;
4808
+ get lastEcoRedemption(): DenEcoRedemption | null;
4809
+ onEcoCreditsRedeemed(listener: (redemption: DenEcoRedemption) => void): Unsubscribe;
4810
+ get ecoConsumers(): ReadonlyMap<number, number>;
4811
+ onEcoConsumers(listener: (consumers: DenEcoConsumers) => void): Unsubscribe;
4812
+ get activeDenIdx(): number | null;
4813
+ onItemList(listener: (items: DenOwnedItems) => void): Unsubscribe;
4814
+ serverState(): Promise<DenServerState | null>;
4815
+ onState(listener: (state: DenServerState) => void): Unsubscribe;
4816
+ saveItems(changes: DenItemSave[], timeoutMs?: number): Promise<number[]>;
4817
+ onSaved(listener: (invIdxs: number[]) => void): Unsubscribe;
4818
+ onSaving(listener: (changes: DenStateChange[]) => void): Unsubscribe;
4819
+ isChangePending(): Promise<boolean>;
4820
+ openDenShopId(): Promise<number | null>;
4821
+ heldDenShop(storeInvId: number): Promise<HeldDenShop | null>;
3587
4822
  private placedItems;
3588
4823
  private placedItem;
3589
4824
  private ownedItems;
3590
4825
  private findOwnedItem;
3591
4826
  private readOwnedItem;
3592
4827
  private readPlacementFields;
4828
+ private saveRow;
4829
+ private findPlaced;
4830
+ private readWithDefs;
4831
+ private lookUpSpecialType;
4832
+ private queueDefs;
4833
+ private holder;
4834
+ private editorOpen;
4835
+ private saveWithoutEditor;
4836
+ private heldStateItems;
4837
+ private markSaved;
3593
4838
  private playerName;
4839
+ private queueGuests;
4840
+ private isOwnDenName;
4841
+ private isOwnName;
3594
4842
  }
3595
4843
  type JamAGramDraft = {
3596
4844
  message: string;
@@ -3601,13 +4849,38 @@ type JamAGramDraft = {
3601
4849
  giftInvId?: number;
3602
4850
  specialType?: number;
3603
4851
  };
4852
+ type JamAGramBuddyAnswerOutcome = {
4853
+ messageId: number | null;
4854
+ accept: boolean | null;
4855
+ result: number;
4856
+ refused: boolean;
4857
+ heardAt: number;
4858
+ };
4859
+ type ClientJamAGram = {
4860
+ messageId: number;
4861
+ senderUserName: string;
4862
+ senderModeratedUserName: string;
4863
+ read: boolean;
4864
+ message: string;
4865
+ type: number;
4866
+ giftId: number;
4867
+ giftName: string;
4868
+ isGift: boolean;
4869
+ cardMediaId: number;
4870
+ stampMediaId: number;
4871
+ specialType: number;
4872
+ };
3604
4873
  declare class ECardsApi {
3605
4874
  readonly [STATE_FIELDS]: readonly [
3606
- "cards"
4875
+ "cards",
4876
+ "buddyAnswer"
3607
4877
  ];
3608
4878
  private readonly flash;
3609
4879
  private readonly server;
3610
4880
  private readonly cards;
4881
+ private buddyAnswer;
4882
+ private readonly answering;
4883
+ private readonly buddyAnswerListeners;
3611
4884
  private readonly receivedListeners;
3612
4885
  private readonly updatedListeners;
3613
4886
  private readonly removedListeners;
@@ -3636,6 +4909,11 @@ declare class ECardsApi {
3636
4909
  acceptGift(messageId: number, colorIndex?: number, timeoutMs?: number): Promise<void>;
3637
4910
  discardGift(messageId: number, timeoutMs?: number): Promise<void>;
3638
4911
  respondToBuddyRequest(messageId: number, accept: boolean): Promise<void>;
4912
+ get lastBuddyAnswer(): JamAGramBuddyAnswerOutcome | null;
4913
+ onBuddyAnswer(listener: (answer: JamAGramBuddyAnswerOutcome) => void): Unsubscribe;
4914
+ onInbox(listener: (cards: JamAGram[]) => void): Unsubscribe;
4915
+ clientInbox(): Promise<ClientJamAGram[]>;
4916
+ clientInboxLoaded(): Promise<boolean>;
3639
4917
  openComposer(userName: string, moderatedUserName?: string): Promise<void>;
3640
4918
  closeInbox(): Promise<void>;
3641
4919
  isComposerOpen(): Promise<boolean>;
@@ -3862,6 +5140,7 @@ type GameScreenToClose = keyof typeof CLOSERS;
3862
5140
  declare class GuiApi {
3863
5141
  private readonly bridge;
3864
5142
  private readonly flash;
5143
+ private currencyPin;
3865
5144
  constructor(game: GameContext, flash: PhantomFlash);
3866
5145
  tree(options?: {
3867
5146
  from?: GuiRoot | GuiTarget;
@@ -3909,6 +5188,10 @@ declare class GuiApi {
3909
5188
  grayHudAvatar(gray?: boolean): Promise<void>;
3910
5189
  toggleHud(): Promise<void>;
3911
5190
  isDarkened(): Promise<boolean>;
5191
+ pinCurrency(): Promise<void>;
5192
+ unpinCurrency(): Promise<void>;
5193
+ get currencyPinned(): boolean;
5194
+ private rollCurrency;
3912
5195
  private chatField;
3913
5196
  private setFieldText;
3914
5197
  private counter;
@@ -3947,6 +5230,18 @@ type PurchaseResult = {
3947
5230
  balance: number | null;
3948
5231
  currencyType: number;
3949
5232
  };
5233
+ type AvatarSlot = {
5234
+ perUserAvId: number;
5235
+ avInvId: number;
5236
+ };
5237
+ type ItemPrizeOffer = {
5238
+ defId: number;
5239
+ isClothing: boolean;
5240
+ color: number;
5241
+ userVarId: number;
5242
+ nameStrId: number;
5243
+ descStrId: number;
5244
+ };
3950
5245
  type RecycleResult = {
3951
5246
  recycled: number[];
3952
5247
  gems: number | null;
@@ -3954,13 +5249,17 @@ type RecycleResult = {
3954
5249
  declare class InventoryApi {
3955
5250
  readonly [STATE_FIELDS]: readonly [
3956
5251
  "inventory",
3957
- "slots"
5252
+ "slots",
5253
+ "prize"
3958
5254
  ];
3959
5255
  private readonly flash;
3960
5256
  private readonly server;
3961
5257
  private inventory;
3962
5258
  private readonly slots;
3963
5259
  private readonly changeListeners;
5260
+ private readonly slotListeners;
5261
+ private readonly prizeListeners;
5262
+ private prize;
3964
5263
  constructor(game: GameContext);
3965
5264
  items({ refresh }?: {
3966
5265
  refresh?: boolean;
@@ -3979,6 +5278,10 @@ declare class InventoryApi {
3979
5278
  }>;
3980
5279
  onChange(listener: (change: InventoryChange) => void): () => void;
3981
5280
  onUse(listener: (success: boolean) => void): () => void;
5281
+ avatarSlots(): AvatarSlot[];
5282
+ onAvatarSlot(listener: (slot: AvatarSlot) => void): Unsubscribe;
5283
+ get latestPrize(): ItemPrizeOffer | null;
5284
+ onPrize(listener: (prize: ItemPrizeOffer) => void): Unsubscribe;
3982
5285
  wear(...invIds: number[]): Promise<boolean>;
3983
5286
  takeOff(...invIds: number[]): Promise<boolean>;
3984
5287
  change({ wear, remove, }: {
@@ -3991,6 +5294,7 @@ declare class InventoryApi {
3991
5294
  diamond?: boolean;
3992
5295
  }): Promise<PurchaseResult>;
3993
5296
  recycle(...invIds: number[]): Promise<RecycleResult>;
5297
+ private keepSlot;
3994
5298
  private keep;
3995
5299
  private apply;
3996
5300
  }
@@ -4007,6 +5311,11 @@ declare class LocalizationApi {
4007
5311
  private codes;
4008
5312
  constructor(game: GameContext, flash: PhantomFlash);
4009
5313
  currentLanguage(): Promise<Language>;
5314
+ accountLanguage(): Promise<Language>;
5315
+ languageForLocale(locale: string): Promise<Language | null>;
5316
+ sortingLocale(): Promise<string>;
5317
+ numberLocale(): Promise<string>;
5318
+ countryCode(): Promise<string>;
4010
5319
  hasLocalizations(): Promise<boolean>;
4011
5320
  translate(id: number): Promise<string>;
4012
5321
  translatePreferred(id: number): Promise<string>;
@@ -4022,12 +5331,48 @@ declare class LocalizationApi {
4022
5331
  private languageCodes;
4023
5332
  }
4024
5333
  type Masterpiece = DenMasterpieceItem;
5334
+ type MasterpieceList = {
5335
+ userName: string | null;
5336
+ items: Masterpiece[];
5337
+ };
5338
+ type MasterpieceCreator = {
5339
+ denUserName: string | null;
5340
+ uniqueImageId: string | null;
5341
+ creatorName: string;
5342
+ };
5343
+ type MasterpieceLikes = {
5344
+ count: number;
5345
+ liked: boolean;
5346
+ };
5347
+ type MasterpieceLikesEvent = MasterpieceLikes & {
5348
+ uniqueImageId: string;
5349
+ ok: boolean;
5350
+ };
5351
+ type MasterpieceLiked = {
5352
+ uniqueImageId: string;
5353
+ ok: boolean;
5354
+ };
5355
+ type LikeableMasterpiece = Pick<Masterpiece, "uniqueImageId" | "uniqueImageCreatorUUID" | "uniqueImageCreatorDbId" | "version">;
4025
5356
  declare class MasterpiecesApi {
4026
5357
  private readonly flash;
4027
5358
  private readonly server;
5359
+ private readonly itemsAsked;
5360
+ private readonly creatorsAsked;
5361
+ private readonly likesAsked;
5362
+ private readonly likesGiven;
5363
+ private readonly itemsListeners;
5364
+ private readonly creatorListeners;
5365
+ private readonly likesListeners;
5366
+ private readonly likedListeners;
4028
5367
  constructor(game: GameContext);
4029
5368
  itemsOf(userName: string, timeoutMs?: number): Promise<Masterpiece[]>;
4030
5369
  creatorOf(denUserName: string, uniqueImageId: string, timeoutMs?: number): Promise<string>;
5370
+ likes(uniqueImageId: string, timeoutMs?: number): Promise<MasterpieceLikes>;
5371
+ like(masterpiece: LikeableMasterpiece, timeoutMs?: number): Promise<boolean>;
5372
+ onItems(listener: (list: MasterpieceList) => void): Unsubscribe;
5373
+ onCreator(listener: (creator: MasterpieceCreator) => void): Unsubscribe;
5374
+ onLikes(listener: (likes: MasterpieceLikesEvent) => void): Unsubscribe;
5375
+ onLiked(listener: (liked: MasterpieceLiked) => void): Unsubscribe;
4031
5376
  }
4032
5377
  type ConnectFourMark = "me" | "opponent" | null;
4033
5378
  type ConnectFourBoard = ReadonlyArray<ReadonlyArray<ConnectFourMark>>;
@@ -4221,6 +5566,7 @@ type MinigameStatus = {
4221
5566
  fullRoomGame: boolean;
4222
5567
  roomName: string;
4223
5568
  pending: PendingMinigame | null;
5569
+ roomEnvironment: number | null;
4224
5570
  };
4225
5571
  type PendingMinigame = {
4226
5572
  gameDefId: number;
@@ -4243,6 +5589,50 @@ type CachedLeaderboard = {
4243
5589
  thisWeek: LeaderboardEntry[];
4244
5590
  buddies: LeaderboardEntry[];
4245
5591
  };
5592
+ type ClientLeaderboard = {
5593
+ gameDefId: number;
5594
+ cachedAt: number;
5595
+ allTime: LeaderboardEntry[];
5596
+ thisWeek: LeaderboardEntry[];
5597
+ buddies: LeaderboardEntry[];
5598
+ };
5599
+ type MinigameJoinRecord = MinigameJoinAnswer & {
5600
+ gameDefId: number | null;
5601
+ heardAt: number;
5602
+ };
5603
+ type PendingPvpInvite = {
5604
+ gameDefId: number;
5605
+ userName: string;
5606
+ nameVisible: boolean;
5607
+ heardAt: number;
5608
+ };
5609
+ type MinigameSerials = {
5610
+ gems: number | null;
5611
+ score: number | null;
5612
+ mastery: number | null;
5613
+ };
5614
+ type MinigameGemSerial = {
5615
+ serial: number;
5616
+ forScore: boolean;
5617
+ };
5618
+ type MinigameMasterySerial = {
5619
+ serial: number;
5620
+ showPopup: boolean;
5621
+ };
5622
+ type MinigameAwardSent = {
5623
+ serial: number | null;
5624
+ award: MinigameAward | null;
5625
+ sums: MinigameAwardSums;
5626
+ };
5627
+ type MinigameScoreSent = {
5628
+ serial: number | null;
5629
+ score: MinigameScore | null;
5630
+ sums: MinigameScoreSums;
5631
+ };
5632
+ type MinigamePlayerInfo = {
5633
+ activePetName: string;
5634
+ member: boolean;
5635
+ };
4246
5636
  type MinigameJoinOptions = {
4247
5637
  multiplayer?: boolean;
4248
5638
  proModeId?: number;
@@ -4254,6 +5644,9 @@ declare class MinigamesApi {
4254
5644
  "requested",
4255
5645
  "session",
4256
5646
  "boards",
5647
+ "joinAnswer",
5648
+ "invite",
5649
+ "serialsHeard",
4257
5650
  "ticTacToe",
4258
5651
  "connectFour",
4259
5652
  "rockPaperScissors",
@@ -4267,6 +5660,14 @@ declare class MinigamesApi {
4267
5660
  private requested;
4268
5661
  private session;
4269
5662
  private readonly boards;
5663
+ private joinAnswer;
5664
+ private invite;
5665
+ private serialsHeard;
5666
+ private readonly gemSerialListeners;
5667
+ private readonly masterySerialListeners;
5668
+ private readonly gemAwardListeners;
5669
+ private readonly masteryAwardListeners;
5670
+ private readonly scoreListeners;
4270
5671
  readonly ticTacToe: MinigameTicTacToeApi;
4271
5672
  readonly connectFour: MinigameConnectFourApi;
4272
5673
  readonly rockPaperScissors: MinigameRockPaperScissorsApi;
@@ -4313,6 +5714,20 @@ declare class MinigamesApi {
4313
5714
  chat(text: string): Promise<void>;
4314
5715
  onPlayerLeft(listener: (left: PacketOf<typeof MinigameLeft>) => void): () => void;
4315
5716
  onRoomRemoved(listener: (removed: PacketOf<typeof MinigameRoomRemoved>) => void): () => void;
5717
+ onLeaderboard(listener: (board: MinigameLeaderboardAnswer) => void): Unsubscribe;
5718
+ clientLeaderboard(gameDefId: number): Promise<ClientLeaderboard | null>;
5719
+ get lastJoin(): MinigameJoinRecord | null;
5720
+ get pvpInvite(): PendingPvpInvite | null;
5721
+ get serials(): MinigameSerials;
5722
+ onGemSerial(listener: (serial: MinigameGemSerial) => void): Unsubscribe;
5723
+ onMasterySerial(listener: (serial: MinigameMasterySerial) => void): Unsubscribe;
5724
+ onGemAward(listener: (sent: MinigameAwardSent) => void): Unsubscribe;
5725
+ onPetMasteryAward(listener: (sent: MinigameAwardSent) => void): Unsubscribe;
5726
+ onScore(listener: (sent: MinigameScoreSent) => void): Unsubscribe;
5727
+ quit(): Promise<void>;
5728
+ playerInfo(): Promise<MinigamePlayerInfo>;
5729
+ gameNameId(gameDefId: number): Promise<number | null>;
5730
+ isMemberAccountType(accountType: number): Promise<boolean>;
4316
5731
  private pendingGame;
4317
5732
  private infoCache;
4318
5733
  private lookUp;
@@ -4320,6 +5735,56 @@ declare class MinigamesApi {
4320
5735
  private manager;
4321
5736
  private comm;
4322
5737
  }
5738
+ type Membership = {
5739
+ userName: string;
5740
+ accountType: number;
5741
+ member: boolean;
5742
+ daysLeft: number;
5743
+ endsAt: number | null;
5744
+ sourceType: string | null;
5745
+ heardAt: number;
5746
+ cause: "login" | "redeemed";
5747
+ };
5748
+ type MembershipLook = {
5749
+ accountType: number;
5750
+ daysLeft: number;
5751
+ };
5752
+ type MembershipLookOptions = {
5753
+ accountType?: number;
5754
+ daysLeft?: number;
5755
+ };
5756
+ type ShownMembership = {
5757
+ accountType: number;
5758
+ member: boolean;
5759
+ daysLeft: number;
5760
+ };
5761
+ declare class MembershipApi {
5762
+ readonly [STATE_FIELDS]: readonly [
5763
+ "heard"
5764
+ ];
5765
+ private heard;
5766
+ private current;
5767
+ private hooks;
5768
+ private questRoom;
5769
+ private readonly changeListeners;
5770
+ private readonly lookListeners;
5771
+ private readonly flash;
5772
+ private readonly server;
5773
+ private readonly client;
5774
+ constructor(game: GameContext);
5775
+ get real(): Membership | null;
5776
+ onChange(listener: (membership: Membership) => void): Unsubscribe;
5777
+ shown(): Promise<ShownMembership>;
5778
+ get showing(): MembershipLook | null;
5779
+ onShowing(listener: (look: MembershipLook | null) => void): Unsubscribe;
5780
+ show(options?: MembershipLookOptions): Promise<MembershipLook>;
5781
+ stopShowing(): Promise<void>;
5782
+ private hear;
5783
+ private hook;
5784
+ private rewriteLogin;
5785
+ private tellGame;
5786
+ private isOwn;
5787
+ }
4323
5788
  type NewspaperIssue = {
4324
5789
  defId: number;
4325
5790
  title: string;
@@ -4343,6 +5808,7 @@ declare class NewspaperApi {
4343
5808
  private readonly seenListeners;
4344
5809
  constructor(game: GameContext);
4345
5810
  definitions(): Promise<NewspaperIssue[]>;
5811
+ definition(defId: number): Promise<NewspaperIssue | null>;
4346
5812
  dataOf(defId: number): Promise<NewspaperReadState | null>;
4347
5813
  hasUnseenPages(): Promise<boolean>;
4348
5814
  hasSeenFirstPage(): Promise<boolean>;
@@ -4461,14 +5927,64 @@ type AdoptionTier = {
4461
5927
  complete: boolean;
4462
5928
  thresholds: number[];
4463
5929
  };
5930
+ type AdoptionChecklist = {
5931
+ success: boolean;
5932
+ cards: AdoptAPetCard[];
5933
+ };
5934
+ type PetRestyle = {
5935
+ success: boolean;
5936
+ gems: number;
5937
+ invId: number;
5938
+ lBits: number;
5939
+ uBits: number;
5940
+ eBits: number;
5941
+ };
5942
+ type PetWornSlots = {
5943
+ cat9: number;
5944
+ cat10: number;
5945
+ cat11: number;
5946
+ };
5947
+ type PetEnviroType = number;
5948
+ type PetAsItem = {
5949
+ invId: number;
5950
+ defId: number;
5951
+ name: string;
5952
+ type: number;
5953
+ enviroType: PetEnviroType;
5954
+ recycleValue: number;
5955
+ currencyType: number;
5956
+ membersOnly: boolean;
5957
+ isEgg: boolean;
5958
+ isHatched: boolean;
5959
+ isAvailable: boolean;
5960
+ isInDenShop: boolean;
5961
+ isDiamond: boolean;
5962
+ isRare: boolean;
5963
+ };
5964
+ type PetPictureOptions = {
5965
+ scale?: number;
5966
+ background?: number | null;
5967
+ maxSize?: number;
5968
+ timeoutMs?: number;
5969
+ };
4464
5970
  declare class PetsApi {
4465
5971
  private readonly flash;
4466
5972
  private readonly server;
4467
5973
  private readonly switchListeners;
4468
5974
  private readonly listListeners;
4469
5975
  private readonly dismissListeners;
4470
- constructor(game: GameContext);
5976
+ private readonly createdListeners;
5977
+ private readonly eggNamedListeners;
5978
+ private readonly masteryListeners;
5979
+ private readonly restyleListeners;
5980
+ private readonly unlockListeners;
5981
+ private readonly checklistListeners;
5982
+ private readonly adoptionCountListeners;
5983
+ private unlockedField;
5984
+ private readonly hooks;
5985
+ constructor(game: GameContext, flash?: PhantomFlash);
4471
5986
  list(): Promise<PlayerPet[]>;
5987
+ private petRecord;
4472
5988
  activeInvId(): Promise<number>;
4473
5989
  active(): Promise<PlayerPet | null>;
4474
5990
  activeName(): Promise<string>;
@@ -4522,9 +6038,67 @@ declare class PetsApi {
4522
6038
  uBits: number;
4523
6039
  eBits: number;
4524
6040
  }>;
6041
+ buy(shopId: number, itemDefId: number, bits: {
6042
+ lBits: number;
6043
+ uBits: number;
6044
+ eBits: number;
6045
+ }, name: {
6046
+ firstNameLocId: number;
6047
+ secondNameLocId: number;
6048
+ }, options?: {
6049
+ fromRedemption?: boolean;
6050
+ timeoutMs?: number;
6051
+ }): Promise<CreatedPet>;
6052
+ restyle(worn: PetWornSlots, options?: {
6053
+ enviroType?: PetEnviroType;
6054
+ timeoutMs?: number;
6055
+ }): Promise<PetRestyle>;
6056
+ adoptionChecklistOf(userName: string, timeoutMs?: number): Promise<AdoptionChecklist>;
6057
+ adoptionCountOf(userName: string, timeoutMs?: number): Promise<number>;
6058
+ adoptionCardDefs(): Promise<AdoptionCardDef[]>;
6059
+ adoptionCardTotal(): Promise<number>;
6060
+ hasAdoptionCards(): Promise<boolean>;
6061
+ definitions(): Promise<PetDefinition[]>;
6062
+ unlockedKinds(): Promise<number[]>;
6063
+ goesOnLandAndInOcean(pet: {
6064
+ defId: number;
6065
+ createdTs: number;
6066
+ }): Promise<boolean>;
6067
+ goesWith(pet: {
6068
+ defId: number;
6069
+ createdTs: number;
6070
+ }, enviroTypeFlag?: number): Promise<boolean>;
6071
+ enviroTypeOf(pet: {
6072
+ defId: number;
6073
+ createdTs: number;
6074
+ }, enviroTypeFlag?: number): Promise<PetEnviroType>;
6075
+ isGroundType(type: number): Promise<boolean>;
6076
+ kindOfBits(lBits: number): Promise<number>;
6077
+ listAsItems(): Promise<PetAsItem[]>;
6078
+ picture(pet: {
6079
+ lBits: number;
6080
+ uBits: number;
6081
+ eBits: number;
6082
+ createdTs?: number;
6083
+ invId?: number;
6084
+ name?: string;
6085
+ personalityDefId?: number;
6086
+ favoriteFoodDefId?: number;
6087
+ favoriteToyDefId?: number;
6088
+ }, options?: PetPictureOptions): Promise<string>;
6089
+ private playerEnviroTypeFlag;
6090
+ private withDefinition;
4525
6091
  onSwitch(listener: (change: PetSwitch) => void): () => void;
4526
6092
  onList(listener: (list: PacketOf<typeof PetList>) => void): () => void;
4527
6093
  onDismissed(listener: (dismissed: PacketOf<typeof PetDismissed>) => void): () => void;
6094
+ onCreated(listener: (created: CreatedPet) => void): () => void;
6095
+ onEggNamed(listener: (named: NamedEggPet) => void): () => void;
6096
+ onMasteryBadge(listener: (result: PetMasteryResult) => void): () => void;
6097
+ onRestyled(listener: (restyle: PetRestyle) => void): () => void;
6098
+ onUnlocked(listener: (defIds: number[]) => void): () => void;
6099
+ onAdoptionChecklist(listener: (checklist: AdoptionChecklist) => void): () => void;
6100
+ onAdoptionCount(listener: (count: number) => void): () => void;
6101
+ onDefinitionsLoaded(listener: () => void): () => void;
4528
6102
  }
4529
6103
  type CachedWall = {
4530
6104
  posts: WallPost[];
@@ -4566,10 +6140,67 @@ type WallContents = {
4566
6140
  notifications: WallPost[];
4567
6141
  parameters: WallValue;
4568
6142
  };
6143
+ type WallAccess = {
6144
+ userName: string | null;
6145
+ granted: boolean;
6146
+ result: string;
6147
+ read: boolean;
6148
+ write: boolean;
6149
+ };
6150
+ type WallPrivacyAnswer = {
6151
+ userName: string | null;
6152
+ setting: number;
6153
+ };
6154
+ type WallPrivacyChange = {
6155
+ setting: number | null;
6156
+ ok: boolean;
6157
+ };
6158
+ type WallParametersChange = {
6159
+ changes: WallValue;
6160
+ ok: boolean;
6161
+ };
6162
+ type WallVisit = {
6163
+ userName: string | null;
6164
+ ok: boolean;
6165
+ };
6166
+ type WallLikes = {
6167
+ count: number;
6168
+ liked: boolean;
6169
+ };
6170
+ type WallLikesEvent = WallLikes & {
6171
+ ownerUuid: string;
6172
+ ok: boolean;
6173
+ };
6174
+ type WallLiked = {
6175
+ ownerUuid: string;
6176
+ ok: boolean;
6177
+ };
6178
+ type WallServiceRequest = {
6179
+ command: string;
6180
+ fields: {
6181
+ [key: string]: WallValue;
6182
+ };
6183
+ };
4569
6184
  declare class PlayerWallApi {
4570
6185
  private readonly flash;
6186
+ private readonly hooks;
6187
+ private readonly server;
4571
6188
  private readonly postsListeners;
4572
- constructor(game: GameContext);
6189
+ private readonly tokensAsked;
6190
+ private readonly privacyAsked;
6191
+ private readonly privacySet;
6192
+ private readonly parametersSent;
6193
+ private readonly visitsCounted;
6194
+ private readonly likesAsked;
6195
+ private readonly likesGiven;
6196
+ private readonly accessListeners;
6197
+ private readonly privacyListeners;
6198
+ private readonly privacyChangeListeners;
6199
+ private readonly parametersListeners;
6200
+ private readonly visitListeners;
6201
+ private readonly likesListeners;
6202
+ private readonly likedListeners;
6203
+ constructor(game: GameContext, hooks: PhantomFlash);
4573
6204
  posts(userName?: string, timeoutMs?: number): Promise<WallContents>;
4574
6205
  check(userName?: string, timeoutMs?: number): Promise<WallValue>;
4575
6206
  post(userName: string, message: string, options?: WallPostOptions, timeoutMs?: number): Promise<void>;
@@ -4592,6 +6223,19 @@ declare class PlayerWallApi {
4592
6223
  isOwnWallOpen(): Promise<boolean>;
4593
6224
  openWallOwner(): Promise<string | null>;
4594
6225
  onPosts(listener: (wall: WallContents) => void): Unsubscribe;
6226
+ requestPermissions(userName: string, timeoutMs?: number): Promise<WallPermissions>;
6227
+ likes(ownerUuid: string, timeoutMs?: number): Promise<WallLikes>;
6228
+ like(ownerUuid: string, timeoutMs?: number): Promise<boolean>;
6229
+ hasOpenedOwnWall(): Promise<boolean>;
6230
+ hasCountedVisit(userName: string): Promise<boolean>;
6231
+ onAccess(listener: (access: WallAccess) => void): Unsubscribe;
6232
+ onPrivacy(listener: (answer: WallPrivacyAnswer) => void): Unsubscribe;
6233
+ onPrivacyChange(listener: (change: WallPrivacyChange) => void): Unsubscribe;
6234
+ onParametersChange(listener: (change: WallParametersChange) => void): Unsubscribe;
6235
+ onVisitCounted(listener: (visit: WallVisit) => void): Unsubscribe;
6236
+ onLikes(listener: (likes: WallLikesEvent) => void): Unsubscribe;
6237
+ onLiked(listener: (liked: WallLiked) => void): Unsubscribe;
6238
+ onServiceRequest(listener: (request: WallServiceRequest) => void): () => void;
4595
6239
  private request;
4596
6240
  myPrivacy(): Promise<number | null>;
4597
6241
  cached(): Promise<CachedWall>;
@@ -4653,15 +6297,131 @@ type DisciplineEvent = {
4653
6297
  disconnects: boolean;
4654
6298
  extra: readonly string[];
4655
6299
  };
6300
+ type PlayerPrivacy = {
6301
+ den: number;
6302
+ eCards: number;
6303
+ playerWall: number;
6304
+ webPlayerWall: number;
6305
+ };
6306
+ type PlayerState = {
6307
+ userName: string;
6308
+ uuid: string;
6309
+ avatarId: number;
6310
+ accountType: number;
6311
+ member: boolean;
6312
+ moderator: boolean;
6313
+ guide: boolean;
6314
+ silenced: boolean;
6315
+ chat: PlayerChatType;
6316
+ loginCount: number;
6317
+ createdAt: number;
6318
+ worldMapRoom: string;
6319
+ pendingFlags: number;
6320
+ tourDone: boolean;
6321
+ needsFirstAnimal: boolean;
6322
+ privacy: PlayerPrivacy;
6323
+ animalDefsLoaded: boolean;
6324
+ hostingParty: boolean;
6325
+ };
6326
+ type PlayerStateChange = {
6327
+ state: PlayerState;
6328
+ changed: Array<keyof PlayerState>;
6329
+ };
6330
+ type PlayerRecord = {
6331
+ userName: string;
6332
+ uuid: string;
6333
+ accountType: number;
6334
+ member: boolean;
6335
+ guide: boolean;
6336
+ nameApproved: boolean;
6337
+ shownName: string;
6338
+ currentAvatarId: number;
6339
+ avatarIds: number[];
6340
+ daysSinceLastLogin: number;
6341
+ hostingParty: boolean;
6342
+ lastAchievementRequest: number;
6343
+ achievementsByType: Record<number, number>;
6344
+ };
6345
+ type KnownAvatar = {
6346
+ userName: string;
6347
+ perUserAvId: number;
6348
+ avInvId: number;
6349
+ avName: string;
6350
+ avTypeId: number;
6351
+ customAvId: number;
6352
+ colors: number[];
6353
+ enviroType: number;
6354
+ questLevel: number;
6355
+ questXp: number;
6356
+ questHealthPercentage: number;
6357
+ dead: boolean;
6358
+ };
6359
+ type ClothingItem = {
6360
+ invIdx: number;
6361
+ defId: number;
6362
+ name: string;
6363
+ color: number;
6364
+ layerId: number;
6365
+ enviroType: number;
6366
+ membersOnly: boolean;
6367
+ inDenShop: boolean;
6368
+ };
6369
+ type AnimalDefaults = {
6370
+ colors: [
6371
+ number,
6372
+ number,
6373
+ number
6374
+ ];
6375
+ eyes: number;
6376
+ enviroTypeFlag: number;
6377
+ };
6378
+ type AnimalKind = {
6379
+ defId: number;
6380
+ titleStrId: number;
6381
+ membersOnly: boolean;
6382
+ enviroTypeFlag: number;
6383
+ defEyes: number;
6384
+ defPattern: number;
6385
+ colors: [
6386
+ number,
6387
+ number,
6388
+ number
6389
+ ];
6390
+ custom: {
6391
+ avatarRefId: number;
6392
+ iconRefId: number;
6393
+ particleRefId: number;
6394
+ patternRefIds: number[];
6395
+ } | null;
6396
+ };
6397
+ type DenRoomDefinition = {
6398
+ defId: number;
6399
+ name: string;
6400
+ titleStrId: number;
6401
+ cost: number;
6402
+ enviroType: number;
6403
+ roomDefId: number;
6404
+ status: number;
6405
+ membersOnly: boolean;
6406
+ mediaId: number;
6407
+ mediaIdLarge: number;
6408
+ availabilityStartTime: number;
6409
+ availabilityEndTime: number;
6410
+ };
6411
+ type PartyHosting = {
6412
+ userName: string;
6413
+ secondsLeft: number;
6414
+ };
4656
6415
  declare class PlayerApi {
4657
6416
  readonly [STATE_FIELDS]: readonly [
4658
6417
  "player"
4659
6418
  ];
4660
6419
  private readonly flash;
6420
+ private readonly client;
4661
6421
  private readonly server;
4662
6422
  private player;
4663
6423
  private readonly listeners;
4664
- constructor(game: GameContext);
6424
+ constructor(game: GameContext, flash: PhantomFlash);
4665
6425
  get login(): LoginPlayer | null;
4666
6426
  onLogin(listener: (player: LoginPlayer) => void): Unsubscribe;
4667
6427
  userName(): Promise<string>;
@@ -4688,7 +6448,37 @@ declare class PlayerApi {
4688
6448
  setInvisible(on: boolean, timeoutMs?: number): Promise<boolean>;
4689
6449
  discipline(): Promise<PlayerDiscipline>;
4690
6450
  onDiscipline(listener: (event: DisciplineEvent) => void): Unsubscribe;
6451
+ onInvisibleChange(listener: (invisible: boolean) => void): Unsubscribe;
6452
+ state(): Promise<PlayerState>;
6453
+ onChange(listener: (change: PlayerStateChange) => void, options?: {
6454
+ everyFrames?: number;
6455
+ }): Unsubscribe;
6456
+ record(userName?: string): Promise<PlayerRecord | null>;
6457
+ avatars(userName?: string): Promise<KnownAvatar[]>;
6458
+ avatarOf(userName: string, perUserAvId?: number): Promise<KnownAvatar | null>;
6459
+ partyTimeLeft(userName?: string): Promise<number>;
6460
+ onPartyHosting(listener: (hosting: PartyHosting) => void): Unsubscribe;
6461
+ onTradeListChange(listener: () => void): Unsubscribe;
6462
+ clothing(options?: {
6463
+ avTypeId?: number;
6464
+ bodyMods?: boolean;
6465
+ }): Promise<ClothingItem[]>;
6466
+ denItemsForRoom(): Promise<DenInventoryItem[]>;
6467
+ petsInDen(world: "land" | "ocean"): Promise<DenInventoryItem[]>;
6468
+ animalKindCount(): Promise<number>;
6469
+ animalDefaults(avTypeId: number): Promise<AnimalDefaults>;
6470
+ customAnimal(customAvId: number): Promise<AnimalKind | null>;
6471
+ customAnimalsOf(avTypeId: number): Promise<AnimalKind[]>;
6472
+ animalOf(userName?: string): Promise<AnimalKind | null>;
6473
+ denRoomDefinitions(): Promise<DenRoomDefinition[]>;
6474
+ denRoomDefinition(defId: number): Promise<DenRoomDefinition | null>;
6475
+ private hear;
6476
+ private stateSources;
6477
+ private recordOf;
6478
+ private avatarHandles;
6479
+ private readCollection;
4691
6480
  private userInfo;
6481
+ private playerUserInfo;
4692
6482
  }
4693
6483
  declare const REPORT_REASONS: {
4694
6484
  readonly mean: 1;
@@ -4710,12 +6500,23 @@ declare const CONTENT_DATA_TYPE: {
4710
6500
  readonly masterpiece: 8;
4711
6501
  };
4712
6502
  type ReportedContent = keyof typeof CONTENT_DATA_TYPE;
6503
+ type SentReport = {
6504
+ userName: string;
6505
+ reason: ReportReason | null;
6506
+ reasonId: number;
6507
+ dataType: number | null;
6508
+ data: string | null;
6509
+ };
4713
6510
  declare class ReportsApi {
4714
6511
  private readonly flash;
4715
6512
  private readonly server;
6513
+ private readonly client;
4716
6514
  constructor(game: GameContext);
4717
6515
  report(userName: string, reason: ReportReason, timeoutMs?: number): Promise<boolean>;
4718
6516
  reportContent(userName: string, kind: ReportedContent, reason: ReportReason, data: string, timeoutMs?: number): Promise<boolean>;
6517
+ onReportResult(listener: (taken: boolean) => void): Unsubscribe;
6518
+ onContentReportResult(listener: (taken: boolean) => void): Unsubscribe;
6519
+ onReportSent(listener: (report: SentReport) => void): Unsubscribe;
4719
6520
  }
4720
6521
  declare const WORLD_ITEM_GIFTS: readonly [
4721
6522
  "denItem",
@@ -4754,6 +6555,25 @@ type WorldItemTaken = {
4754
6555
  taken: boolean;
4755
6556
  balance: number | null;
4756
6557
  };
6558
+ type WorldItemTakenEvent = WorldItemTaken & {
6559
+ defId: number | null;
6560
+ };
6561
+ type RoomDarkArea = {
6562
+ x: number;
6563
+ y: number;
6564
+ rotation: number;
6565
+ bounds: {
6566
+ x: number;
6567
+ y: number;
6568
+ width: number;
6569
+ height: number;
6570
+ };
6571
+ };
6572
+ type RoomObjectAt = {
6573
+ name: string;
6574
+ className: string;
6575
+ isJourneyBookItem: boolean;
6576
+ };
4757
6577
  type RoomSpawn = {
4758
6578
  name: string;
4759
6579
  x: number;
@@ -4872,12 +6692,15 @@ declare class RoomApi {
4872
6692
  private roomLayout;
4873
6693
  private readonly listeners;
4874
6694
  private readonly failureListeners;
6695
+ private readonly giftsAsked;
6696
+ private readonly giftListeners;
4875
6697
  private readonly server;
4876
6698
  private readonly flash;
4877
6699
  constructor(game: GameContext);
4878
6700
  get current(): RoomInfo | null;
4879
6701
  get details(): RoomDetails | null;
4880
6702
  get layout(): RoomLayout | null;
6703
+ onLayout(listener: (layout: RoomLayout) => void): () => void;
4881
6704
  toScreen(point: {
4882
6705
  x: number;
4883
6706
  y: number;
@@ -4894,6 +6717,7 @@ declare class RoomApi {
4894
6717
  }>;
4895
6718
  worldItem(defId: number): Promise<WorldItem | null>;
4896
6719
  takeWorldItem(defId: number, options?: WorldItemTakeOptions, timeoutMs?: number): Promise<WorldItemTaken>;
6720
+ onWorldItemTaken(listener: (gift: WorldItemTakenEvent) => void): () => void;
4897
6721
  private hasTakenGift;
4898
6722
  onJoin(listener: (room: RoomInfo) => void): () => void;
4899
6723
  focusCamera(at: {
@@ -4957,6 +6781,25 @@ declare class RoomApi {
4957
6781
  setPathDepth(cells: number): Promise<void>;
4958
6782
  reload(): Promise<boolean>;
4959
6783
  showAvatars(show: boolean): Promise<void>;
6784
+ joiningInvisibly(): Promise<boolean>;
6785
+ darkAreas(): Promise<RoomDarkArea[]>;
6786
+ nearestEmptyCell(point: {
6787
+ x: number;
6788
+ y: number;
6789
+ }): Promise<{
6790
+ x: number;
6791
+ y: number;
6792
+ } | null>;
6793
+ journeyBookItemsLeft(): Promise<number>;
6794
+ objectAt(point: {
6795
+ x: number;
6796
+ y: number;
6797
+ }, options?: {
6798
+ journeyBookOnly?: boolean;
6799
+ }): Promise<RoomObjectAt | null>;
6800
+ setJamaaTime(milliseconds: number): Promise<void>;
6801
+ setDenKickNotice(show: boolean): Promise<void>;
6802
+ private darkArea;
4960
6803
  private actors;
4961
6804
  private number;
4962
6805
  private convert;
@@ -4989,9 +6832,11 @@ type RoomPlayerView = {
4989
6832
  declare class RoomPlayers {
4990
6833
  readonly [STATE_FIELDS]: readonly [
4991
6834
  "byId",
4992
- "selfId"
6835
+ "selfId",
6836
+ "paths"
4993
6837
  ];
4994
6838
  private readonly byId;
6839
+ private readonly paths;
4995
6840
  private readonly enterListeners;
4996
6841
  private readonly leaveListeners;
4997
6842
  private readonly moveListeners;
@@ -5006,6 +6851,10 @@ declare class RoomPlayers {
5006
6851
  onEnter(listener: (player: RoomPlayer) => void): () => void;
5007
6852
  onLeave(listener: (player: RoomPlayer) => void): () => void;
5008
6853
  onMove(listener: (player: RoomPlayer) => void): () => void;
6854
+ pathOf(userId: number): Array<{
6855
+ x: number;
6856
+ y: number;
6857
+ }> | null;
5009
6858
  refresh(): Promise<readonly RoomPlayer[]>;
5010
6859
  viewOf(userId: number): Promise<RoomPlayerView | null>;
5011
6860
  views(): Promise<RoomPlayerView[]>;
@@ -5021,9 +6870,15 @@ type ConnectionOutcome = {
5021
6870
  connected: boolean;
5022
6871
  };
5023
6872
  declare class SessionApi {
6873
+ readonly [STATE_FIELDS]: readonly [
6874
+ "validated"
6875
+ ];
5024
6876
  private readonly bridge;
5025
6877
  private readonly flash;
5026
6878
  private readonly serverSide;
6879
+ private readonly clientSide;
6880
+ private validated;
6881
+ private keepActiveTimer;
5027
6882
  constructor(game: GameContext, flash: PhantomFlash);
5028
6883
  connected(): Promise<boolean>;
5029
6884
  mode(): Promise<ConnectionMode>;
@@ -5036,6 +6891,18 @@ declare class SessionApi {
5036
6891
  }): Promise<void>;
5037
6892
  requestList(listId: number, timeoutMs?: number): Promise<ShopListFields>;
5038
6893
  onList(listener: (list: ShopListFields) => void): Unsubscribe;
6894
+ inMinigame(): Promise<boolean>;
6895
+ settingsUserName(): Promise<string>;
6896
+ sendEmailActivation(email: string, timeoutMs?: number): Promise<boolean>;
6897
+ onEmailActivation(listener: (sent: boolean) => void): Unsubscribe;
6898
+ onEmailActivationRequest(listener: (email: string) => void): Unsubscribe;
6899
+ get emailValidated(): boolean;
6900
+ onEmailValidated(listener: () => void): Unsubscribe;
6901
+ markActive(): Promise<void>;
6902
+ keepActive(): Promise<void>;
6903
+ stopKeepingActive(): Promise<void>;
6904
+ get keepingActive(): boolean;
6905
+ onIdleWarning(listener: () => void): Unsubscribe;
5039
6906
  private hookVoid;
5040
6907
  }
5041
6908
  type ItemDefinition = {
@@ -5084,6 +6951,21 @@ type ShopListing = {
5084
6951
  listType: number;
5085
6952
  defIds: number[];
5086
6953
  };
6954
+ type ItemPictureKind = "clothing" | "den-item";
6955
+ type ItemPictureItem = number | {
6956
+ defId: number;
6957
+ kind?: ItemPictureKind;
6958
+ color?: number;
6959
+ };
6960
+ type ItemPictureOptions = {
6961
+ scale?: number;
6962
+ background?: number | null;
6963
+ maxSize?: number;
6964
+ large?: boolean;
6965
+ version?: number;
6966
+ timeoutMs?: number;
6967
+ cache?: boolean;
6968
+ };
5087
6969
  type DenShopOffering = {
5088
6970
  shopId: number;
5089
6971
  listType: number;
@@ -5141,6 +7023,7 @@ declare class ShopsApi {
5141
7023
  private readonly client;
5142
7024
  private readonly server;
5143
7025
  private readonly lists;
7026
+ private readonly pictures;
5144
7027
  constructor(game: GameContext, flash: PhantomFlash);
5145
7028
  offering(shopId: number, { refresh, timeoutMs, }?: {
5146
7029
  refresh?: boolean;
@@ -5152,6 +7035,7 @@ declare class ShopsApi {
5152
7035
  }): Promise<DenShopOffering>;
5153
7036
  definition(defId: number): Promise<ItemDefinition | null>;
5154
7037
  definitionsReady(): Promise<boolean>;
7038
+ picture(item: ItemPictureItem, options?: ItemPictureOptions): Promise<string>;
5155
7039
  isAvailable(window: {
5156
7040
  availabilityStartTime: number;
5157
7041
  availabilityEndTime: number;
@@ -5163,6 +7047,10 @@ declare class ShopsApi {
5163
7047
  }): Promise<DiamondDefinition | null>;
5164
7048
  diamondList(defIds: number[]): Promise<DiamondShopList>;
5165
7049
  listType(shopId: number): Promise<number | null>;
7050
+ knownShops(): Promise<Array<{
7051
+ shopId: number;
7052
+ listType: number;
7053
+ }>>;
5166
7054
  open(shopId: number): Promise<void>;
5167
7055
  close(): Promise<void>;
5168
7056
  isOpen(): Promise<boolean>;
@@ -5188,7 +7076,13 @@ declare class ShopsApi {
5188
7076
  onBuy(listener: (purchase: Purchase) => void): Unsubscribe;
5189
7077
  onSell(listener: (sale: Sale) => void): Unsubscribe;
5190
7078
  onList(listener: (listing: ShopListing) => void): Unsubscribe;
7079
+ onDiamondBundleBuy(listener: (result: {
7080
+ bought: boolean;
7081
+ balance: number | null;
7082
+ }) => void): Unsubscribe;
5191
7083
  private definitionsLoaded;
7084
+ private drawClothing;
7085
+ private drawDenItem;
5192
7086
  private listFor;
5193
7087
  }
5194
7088
  declare const BANKS: {
@@ -5317,6 +7211,24 @@ type TradeEnd = {
5317
7211
  userName: string | null;
5318
7212
  roomName: string | null;
5319
7213
  };
7214
+ type TradeDraftItem = TradeItemRef & {
7215
+ defId: number;
7216
+ };
7217
+ type TradeCounts = {
7218
+ myList: {
7219
+ clothing: number;
7220
+ den: number;
7221
+ pets: number;
7222
+ };
7223
+ draft: {
7224
+ clothing: number;
7225
+ den: number;
7226
+ };
7227
+ };
7228
+ type TradeListEdit = {
7229
+ added: InventoryRef[];
7230
+ removed: InventoryRef[];
7231
+ };
5320
7232
  type TradeListing = Omit<PacketOf<typeof TradeList>, "room">;
5321
7233
  declare class TradesApi {
5322
7234
  readonly [STATE_FIELDS]: readonly [
@@ -5324,6 +7236,7 @@ declare class TradesApi {
5324
7236
  ];
5325
7237
  private readonly flash;
5326
7238
  private readonly server;
7239
+ private readonly clientSide;
5327
7240
  private pending;
5328
7241
  constructor(game: GameContext);
5329
7242
  get offer(): TradeOffer | null;
@@ -5345,6 +7258,11 @@ declare class TradesApi {
5345
7258
  heldList(): Promise<TradeItemRef[]>;
5346
7259
  list(userName: string, timeoutMs?: number): Promise<TradeListing>;
5347
7260
  onList(listener: (listing: TradeListing) => void): Unsubscribe;
7261
+ onListChanged(listener: (edit: TradeListEdit) => void): Unsubscribe;
7262
+ offerDraft(): Promise<TradeDraftItem[]>;
7263
+ counts(): Promise<TradeCounts>;
7264
+ listEntry(item: TradeItemRef): Promise<TradeItemRef | null>;
7265
+ private ownCollection;
5348
7266
  private comm;
5349
7267
  private changeList;
5350
7268
  private endInClient;
@@ -5470,10 +7388,17 @@ type UiOptions = {
5470
7388
  height?: number;
5471
7389
  visible?: boolean;
5472
7390
  };
7391
+ type UiReadiness = {
7392
+ art: boolean;
7393
+ palettes: boolean;
7394
+ };
5473
7395
  type UiWindow = UiWidget & {
5474
7396
  readonly body: OverlayNode;
5475
7397
  readonly width: number;
5476
7398
  readonly height: number;
7399
+ readonly bodyWidth: number;
7400
+ readonly bodyHeight: number;
7401
+ readonly framed: boolean;
5477
7402
  setTitle(title: string): Promise<void>;
5478
7403
  onClose(listener: () => void): UiRemove;
5479
7404
  onMove(listener: (position: {
@@ -5597,6 +7522,7 @@ type UiTooltip = UiWidget & {
5597
7522
  type UiTooltipOptions = UiOptions & {
5598
7523
  text?: string;
5599
7524
  visible?: boolean;
7525
+ target?: UiWidget | OverlayNode;
5600
7526
  };
5601
7527
  type UiProgress = UiWidget & {
5602
7528
  value(): number;
@@ -5665,10 +7591,14 @@ declare class UiApi {
5665
7591
  private symbolMaker;
5666
7592
  private gameFont;
5667
7593
  private defaultSkin;
7594
+ private readonly known;
7595
+ readyTimeoutMs: number;
5668
7596
  readonly popup: UiPopups;
5669
7597
  constructor(game: GameContext, flash: PhantomFlash);
5670
7598
  get skin(): UiSkin;
5671
7599
  set skin(skin: UiSkin);
7600
+ status(): Promise<UiReadiness>;
7601
+ ready(timeoutMs?: number): Promise<UiReadiness>;
5672
7602
  theme(skin?: UiSkin): Promise<UiTheme>;
5673
7603
  symbols(): Array<[
5674
7604
  UiSymbolName,
@@ -5687,6 +7617,8 @@ declare class UiApi {
5687
7617
  grid(options: UiGridOptions): Promise<UiGrid>;
5688
7618
  scroll(options?: UiScrollOptions): Promise<UiScroll>;
5689
7619
  tooltip(options?: UiTooltipOptions): Promise<UiTooltip>;
7620
+ private bubble;
7621
+ private explain;
5690
7622
  progress(options?: UiProgressOptions): Promise<UiProgress>;
5691
7623
  colors(options?: UiColorsOptions): Promise<UiColors>;
5692
7624
  paletteValues(which?: 1 | 2 | "game"): Promise<number[]>;
@@ -5709,9 +7641,16 @@ declare class UiApi {
5709
7641
  private placeOf;
5710
7642
  private maker;
5711
7643
  private nodeObject;
7644
+ private adopt;
7645
+ private waitFor;
7646
+ private artLoaded;
7647
+ private palettesLoaded;
5712
7648
  private clientFont;
5713
7649
  private frameOnly;
5714
7650
  private dressWindow;
7651
+ private frameClose;
7652
+ private boundsOf;
7653
+ private parchmentOf;
5715
7654
  private clientTooltip;
5716
7655
  private palette;
5717
7656
  private clientColorTable;
@@ -5764,6 +7703,23 @@ type PartyRules = {
5764
7703
  canSwitchPet: boolean;
5765
7704
  };
5766
7705
  type PartyHostOutcome = PacketOf<typeof CustomPartyHostResult>;
7706
+ type PartyJoinAnswer = {
7707
+ kind: "party" | "custom";
7708
+ joined: boolean;
7709
+ reason: string | null;
7710
+ extra: readonly string[];
7711
+ };
7712
+ type HostingStatus = {
7713
+ state: "hosting";
7714
+ secondsLeft: number | null;
7715
+ } | {
7716
+ state: "refused";
7717
+ reason: string | null;
7718
+ } | {
7719
+ state: "ended";
7720
+ diamondsRefunded: number;
7721
+ };
7722
+ type PartyMasterpiece = PoolMasterpiece;
5767
7723
  type CustomPartyWhereabouts = {
5768
7724
  creatorUuid: string;
5769
7725
  node: string;
@@ -5776,11 +7732,23 @@ type GoToPlayerResult = {
5776
7732
  switchingNode: boolean;
5777
7733
  };
5778
7734
  declare class WorldApi {
7735
+ readonly [STATE_FIELDS]: readonly [
7736
+ "listedRooms",
7737
+ "loginKey",
7738
+ "hopHost",
7739
+ "partyJoin",
7740
+ "hostingStatus"
7741
+ ];
5779
7742
  private readonly partyFailureListeners;
5780
7743
  private readonly partyListListeners;
5781
7744
  private readonly partyNodeListeners;
5782
7745
  private readonly flash;
5783
7746
  private readonly server;
7747
+ private readonly listedRooms;
7748
+ private loginKey;
7749
+ private hopHost;
7750
+ private partyJoin;
7751
+ private hostingStatus;
5784
7752
  constructor(game: GameContext);
5785
7753
  serverNode(): Promise<ServerNode>;
5786
7754
  shardId(): Promise<number>;
@@ -5801,7 +7769,9 @@ declare class WorldApi {
5801
7769
  onParties(listener: (parties: ScheduledParty[]) => void): () => void;
5802
7770
  onPartyNode(listener: (node: PacketOf<typeof CustomPartyNode>) => void): () => void;
5803
7771
  partyDefinition(defId: number): Promise<PartyDefinition | null>;
7772
+ partyDefinitions(): Promise<PartyDefinition[]>;
5804
7773
  partyRules(): Promise<PartyRules>;
7774
+ canUseAvatarHere(perUserAvId: number): Promise<boolean>;
5805
7775
  shardName(shardId: number): Promise<string>;
5806
7776
  hostParty(partyDefId: number, nameStrIds: readonly [
5807
7777
  number,
@@ -5811,11 +7781,441 @@ declare class WorldApi {
5811
7781
  onHostingEnded(listener: (ended: PacketOf<typeof CustomPartyKilled>) => void): () => void;
5812
7782
  partyNode(creatorUuid: string, timeoutMs?: number): Promise<CustomPartyWhereabouts | null>;
5813
7783
  hostingTimeLeft(creatorUuid: string, userName?: string, timeoutMs?: number): Promise<number>;
7784
+ onHostingTimeLeft(listener: (secondsLeft: number) => void): () => void;
5814
7785
  showParties(open?: boolean): Promise<void>;
5815
7786
  onRoomList(listener: (rooms: readonly ListedRoom[]) => void): () => void;
5816
7787
  onRandomKey(listener: (key: string) => void): () => void;
7788
+ get rooms(): readonly ListedRoom[];
7789
+ get randomKey(): string | null;
7790
+ get lastNodeHop(): string | null;
7791
+ get lastPartyJoin(): PartyJoinAnswer | null;
7792
+ get hosting(): HostingStatus | null;
7793
+ onHostResult(listener: (outcome: PartyHostOutcome) => void): () => void;
7794
+ onCustomParties(listener: (parties: CustomParty[]) => void): () => void;
7795
+ onShards(listener: (nodes: ShardNode[]) => void): () => void;
7796
+ partyMasterpieces(timeoutMs?: number): Promise<PartyMasterpiece[]>;
7797
+ onPartyMasterpieces(listener: (pool: PartyMasterpiece[]) => void): () => void;
7798
+ requestFirstFiveMinutesRoom(timeoutMs?: number): Promise<boolean>;
7799
+ onFirstFiveMinutesRoom(listener: (ready: boolean) => void): () => void;
7800
+ joinNamedRoom(roomName: string): Promise<void>;
7801
+ roomDefinitions(): Promise<RoomDefinition[]>;
5817
7802
  private partyFailed;
5818
7803
  }
7804
+ type JourneyBookCounts = {
7805
+ unseenPages: number;
7806
+ unclaimedGifts: number;
7807
+ };
7808
+ declare class JourneyBookApi {
7809
+ private readonly flash;
7810
+ private readonly client;
7811
+ constructor(game: GameContext, flash: PhantomFlash);
7812
+ counts(): Promise<JourneyBookCounts>;
7813
+ unseenPages(): Promise<number>;
7814
+ unclaimedGifts(): Promise<number>;
7815
+ open(factDefId?: number): Promise<void>;
7816
+ onChange(listener: (counts: JourneyBookCounts) => void): Unsubscribe;
7817
+ }
7818
+ type ReferralCodeInfo = {
7819
+ code: string;
7820
+ link: string;
7821
+ };
7822
+ type ReferredPlayer = Referral & {
7823
+ member: boolean;
7824
+ };
7825
+ type ReferralPage = {
7826
+ referrals: ReferredPlayer[];
7827
+ more: boolean;
7828
+ status: number;
7829
+ };
7830
+ type ReferrerOutcome = "recorded" | "refused" | "failed";
7831
+ declare class ReferralsApi {
7832
+ readonly [STATE_FIELDS]: readonly [
7833
+ "heardCode"
7834
+ ];
7835
+ private readonly flash;
7836
+ private readonly server;
7837
+ private heardCode;
7838
+ constructor(game: GameContext);
7839
+ get code(): string | null;
7840
+ fetchCode(timeoutMs?: number): Promise<ReferralCodeInfo>;
7841
+ clientCode(): Promise<string | null>;
7842
+ hasReferrer(timeoutMs?: number): Promise<boolean>;
7843
+ nameReferrer(userName: string, timeoutMs?: number): Promise<ReferrerOutcome>;
7844
+ list(options?: {
7845
+ page?: number;
7846
+ pageSize?: number;
7847
+ timeoutMs?: number;
7848
+ }): Promise<ReferralPage>;
7849
+ onCode(listener: (code: ReferralCodeInfo | null) => void): Unsubscribe;
7850
+ onHasReferrer(listener: (hasReferrer: boolean) => void): Unsubscribe;
7851
+ onReferrerNamed(listener: (outcome: ReferrerOutcome) => void): Unsubscribe;
7852
+ onList(listener: (page: ReferralPage) => void): Unsubscribe;
7853
+ }
7854
+ type ShortcutOptions = {
7855
+ release?: boolean;
7856
+ repeat?: boolean;
7857
+ consume?: boolean;
7858
+ anyModifiers?: boolean;
7859
+ };
7860
+ type Shortcut = Required<ShortcutOptions> & {
7861
+ shortcut: string;
7862
+ };
7863
+ type ShortcutPress = {
7864
+ shortcut: string;
7865
+ phase: "down" | "up";
7866
+ code: number;
7867
+ ctrl: boolean;
7868
+ shift: boolean;
7869
+ alt: boolean;
7870
+ consumed: boolean;
7871
+ };
7872
+ declare class InputApi {
7873
+ private readonly flash;
7874
+ private readonly bindings;
7875
+ private readonly listeners;
7876
+ private readonly held;
7877
+ constructor(game: GameContext);
7878
+ bind(shortcut: string, options?: ShortcutOptions): Promise<Shortcut>;
7879
+ unbind(shortcut: string): Promise<boolean>;
7880
+ get bound(): Shortcut[];
7881
+ onShortcut(listener: (press: ShortcutPress) => void): Unsubscribe;
7882
+ private listen;
7883
+ private tell;
7884
+ }
7885
+ type ViewState = {
7886
+ zoom: number | null;
7887
+ zoomChanged: boolean;
7888
+ interfaceShown: boolean;
7889
+ ownAvatarShown: boolean;
7890
+ ownNameTagShown: boolean;
7891
+ };
7892
+ declare class ViewApi {
7893
+ private readonly bridge;
7894
+ private readonly flash;
7895
+ private readonly hidden;
7896
+ private readonly listeners;
7897
+ private natural;
7898
+ private following;
7899
+ private zoomHooks;
7900
+ private last;
7901
+ constructor(game: GameContext, flash: PhantomFlash);
7902
+ state(): Promise<ViewState>;
7903
+ zoom(): Promise<number | null>;
7904
+ get zoomLimits(): {
7905
+ min: number;
7906
+ max: number;
7907
+ };
7908
+ setZoom(percent: number): Promise<number | null>;
7909
+ resetZoom(): Promise<number | null>;
7910
+ showInterface(show: boolean): Promise<boolean>;
7911
+ showOwnAvatar(show: boolean): Promise<boolean>;
7912
+ showOwnNameTag(show: boolean): Promise<boolean>;
7913
+ onChange(listener: (state: ViewState) => void): Unsubscribe;
7914
+ private set;
7915
+ private hide;
7916
+ private follow;
7917
+ private hideAgain;
7918
+ private stopFollowing;
7919
+ private hookZoom;
7920
+ private changed;
7921
+ }
7922
+ type LookItem = {
7923
+ defId: number;
7924
+ color: number;
7925
+ };
7926
+ type Look = {
7927
+ avTypeId: number;
7928
+ colors: Record<AvatarColorPart, number>;
7929
+ eyes: number;
7930
+ pattern: number;
7931
+ items: LookItem[];
7932
+ };
7933
+ type LookItemPlan = {
7934
+ item: LookItem;
7935
+ invId: number | null;
7936
+ status: "worn" | "put-on" | "other-colour" | "not-owned" | "not-wearable";
7937
+ };
7938
+ type LookPlan = {
7939
+ items: LookItemPlan[];
7940
+ eyes: "same" | "change" | "not-wearable";
7941
+ pattern: "same" | "change" | "not-wearable";
7942
+ wear: number[];
7943
+ remove: number[];
7944
+ colors: AvatarColors | null;
7945
+ };
7946
+ type LookOptions = {
7947
+ replace?: boolean;
7948
+ otherColours?: boolean;
7949
+ keepColors?: boolean;
7950
+ };
7951
+ type LookResult = {
7952
+ plan: LookPlan;
7953
+ items: boolean | null;
7954
+ colors: boolean | null;
7955
+ };
7956
+ type LookChange = {
7957
+ kind: "clothing";
7958
+ userName: string;
7959
+ perUserAvId: number;
7960
+ added: number[];
7961
+ removed: number[];
7962
+ } | {
7963
+ kind: "colors";
7964
+ success: boolean;
7965
+ };
7966
+ declare class LooksApi {
7967
+ private readonly areas;
7968
+ private readonly flash;
7969
+ private readonly server;
7970
+ constructor(game: GameContext, areas: () => {
7971
+ avatar: AvatarApi;
7972
+ inventory: InventoryApi;
7973
+ });
7974
+ private get avatar();
7975
+ private get inventory();
7976
+ current(): Promise<Look>;
7977
+ of(userName: string): Promise<Look | null>;
7978
+ plan(look: Look, options?: LookOptions): Promise<LookPlan>;
7979
+ putOn(look: Look, options?: LookOptions): Promise<LookResult>;
7980
+ onChange(listener: (change: LookChange) => void): () => void;
7981
+ private player;
7982
+ private holding;
7983
+ }
7984
+ type ArtImage = {
7985
+ width: number;
7986
+ height: number;
7987
+ data: ArrayLike<number>;
7988
+ };
7989
+ type ArtPictureInput = ArtImage | Uint8Array | ArrayBuffer | string;
7990
+ type ArtFit = "contain" | "cover" | "stretch";
7991
+ type ArtPlanOptions = {
7992
+ colors?: number;
7993
+ palette?: readonly number[];
7994
+ dither?: boolean;
7995
+ fit?: ArtFit;
7996
+ background?: number;
7997
+ };
7998
+ type ArtPaintingPlan = {
7999
+ columns: number;
8000
+ rows: number;
8001
+ cellSize: number;
8002
+ palette: number[];
8003
+ cells: Uint16Array;
8004
+ preview: {
8005
+ width: number;
8006
+ height: number;
8007
+ data: Uint8ClampedArray;
8008
+ };
8009
+ runs: ArtRun[][];
8010
+ };
8011
+ type ArtRun = {
8012
+ row: number;
8013
+ from: number;
8014
+ to: number;
8015
+ };
8016
+ type CanvasPoint = {
8017
+ x: number;
8018
+ y: number;
8019
+ };
8020
+ type CanvasShape = "line" | "rectangle" | "ellipse" | "triangle";
8021
+ declare const SWF_NAMES: {
8022
+ readonly painting: "ArtStudioPainting";
8023
+ readonly grid: "ArtStudioGridDrawing";
8024
+ readonly pottery: "ArtStudioPottery";
8025
+ readonly print: "ArtStudioPrint";
8026
+ };
8027
+ type ArtStudioKind = keyof typeof SWF_NAMES;
8028
+ type ArtCanvasKind = "painting" | "grid";
8029
+ type ArtStudioTool = "brush" | "line" | "airbrush" | "rectangle" | "fill" | "ellipse" | "smudge" | "triangle" | "pencil";
8030
+ type ArtPaintSpeed = "instant" | "fast" | "steady" | "slow";
8031
+ type ArtCanvasState = {
8032
+ kind: ArtCanvasKind;
8033
+ ready: boolean;
8034
+ width: number;
8035
+ height: number;
8036
+ tool: ArtStudioTool | null;
8037
+ brushSize: number;
8038
+ brushWidth: number;
8039
+ cellSize: number | null;
8040
+ color: number;
8041
+ hasDrawn: boolean;
8042
+ needsSave: boolean;
8043
+ undoable: boolean;
8044
+ };
8045
+ type ArtPotteryState = {
8046
+ kind: "pottery";
8047
+ ready: boolean;
8048
+ design: number;
8049
+ designs: number;
8050
+ colouring: boolean;
8051
+ };
8052
+ type ArtPrintState = {
8053
+ kind: "print";
8054
+ ready: boolean;
8055
+ picture: number;
8056
+ pictures: number;
8057
+ loading: boolean;
8058
+ };
8059
+ type ArtStudioState = ArtCanvasState | ArtPotteryState | ArtPrintState;
8060
+ type ArtStudioPalette = {
8061
+ kind: ArtCanvasKind;
8062
+ brushWidths: number[];
8063
+ swatches: number[];
8064
+ anyColor: boolean;
8065
+ };
8066
+ type ArtStroke = {
8067
+ kind: ArtCanvasKind;
8068
+ tool: ArtStudioTool | null;
8069
+ color: number;
8070
+ brushSize: number;
8071
+ by: "player" | "plugin";
8072
+ };
8073
+ type ArtToolChange = {
8074
+ kind: ArtCanvasKind | null;
8075
+ tool: ArtStudioTool | null;
8076
+ brushSize: number;
8077
+ };
8078
+ type ArtColorChange = {
8079
+ kind: ArtCanvasKind | null;
8080
+ color: number;
8081
+ };
8082
+ type ArtSubmitTarget = "animal-jam" | "masterpiece";
8083
+ type ArtSubmitStart = {
8084
+ kind: ArtCanvasKind;
8085
+ target: ArtSubmitTarget;
8086
+ };
8087
+ type ArtSubmitResult = {
8088
+ kind: ArtCanvasKind;
8089
+ target: ArtSubmitTarget;
8090
+ ok: boolean;
8091
+ masterpieceId: string | null;
8092
+ refused: boolean;
8093
+ };
8094
+ type ArtMasterpieceBought = {
8095
+ kind: ArtCanvasKind;
8096
+ ok: boolean;
8097
+ diamonds: number;
8098
+ denItemInvId: number;
8099
+ };
8100
+ type ArtBrowsed = {
8101
+ kind: "pottery" | "print";
8102
+ index: number;
8103
+ count: number;
8104
+ };
8105
+ type ArtPaintOptions = ArtPlanOptions & {
8106
+ brushSize?: number;
8107
+ speed?: ArtPaintSpeed;
8108
+ clearFirst?: boolean;
8109
+ };
8110
+ type ArtPaintProgress = {
8111
+ color: number;
8112
+ colors: number;
8113
+ strokes: number;
8114
+ totalStrokes: number;
8115
+ };
8116
+ type ArtPaintResult = ArtPaintProgress & {
8117
+ completed: boolean;
8118
+ error: string | null;
8119
+ };
8120
+ type ArtPaintStart = {
8121
+ columns: number;
8122
+ rows: number;
8123
+ cellSize: number;
8124
+ colors: number;
8125
+ totalStrokes: number;
8126
+ };
8127
+ declare class ArtStudioApi {
8128
+ private readonly flash;
8129
+ private readonly client;
8130
+ private job;
8131
+ private finished;
8132
+ private readonly strokeListeners;
8133
+ private readonly progressListeners;
8134
+ private readonly doneListeners;
8135
+ constructor(game: GameContext, flash: PhantomFlash);
8136
+ isOpen(): Promise<boolean>;
8137
+ current(): Promise<ArtStudioKind | null>;
8138
+ state(): Promise<ArtStudioState | null>;
8139
+ palette(): Promise<ArtStudioPalette | null>;
8140
+ picture(options?: {
8141
+ scale?: number;
8142
+ maxSize?: number;
8143
+ }): Promise<string | null>;
8144
+ open(kind: ArtStudioKind, options?: {
8145
+ gameDefId?: number;
8146
+ }): Promise<void>;
8147
+ close(options?: {
8148
+ confirm?: boolean;
8149
+ }): Promise<boolean>;
8150
+ setTool(tool: ArtStudioTool): Promise<void>;
8151
+ setBrushSize(size: number): Promise<void>;
8152
+ setColor(color: number): Promise<void>;
8153
+ stroke(points: readonly CanvasPoint[], options?: {
8154
+ tool?: "brush" | "airbrush";
8155
+ color?: number;
8156
+ size?: number;
8157
+ }): Promise<number>;
8158
+ shape(shape: CanvasShape, from: CanvasPoint, to: CanvasPoint, options?: {
8159
+ color?: number;
8160
+ size?: number;
8161
+ }): Promise<void>;
8162
+ fill(point: CanvasPoint, options?: {
8163
+ color?: number;
8164
+ }): Promise<void>;
8165
+ setCells(cells: ReadonlyArray<{
8166
+ column: number;
8167
+ row: number;
8168
+ color: number;
8169
+ }>): Promise<number>;
8170
+ clear(options?: {
8171
+ confirm?: boolean;
8172
+ }): Promise<void>;
8173
+ undo(): Promise<void>;
8174
+ planPainting(image: ArtPictureInput, options?: ArtPaintOptions & {
8175
+ canvas?: {
8176
+ width: number;
8177
+ height: number;
8178
+ cellSize?: number;
8179
+ };
8180
+ }): Promise<ArtPaintingPlan>;
8181
+ paintImage(image: ArtPictureInput, options?: ArtPaintOptions): Promise<ArtPaintResult>;
8182
+ startPainting(image: ArtPictureInput, options?: ArtPaintOptions): Promise<ArtPaintStart>;
8183
+ stopPainting(): Promise<ArtPaintResult | null>;
8184
+ painting(): ArtPaintProgress | null;
8185
+ submit(options?: {
8186
+ confirm?: boolean;
8187
+ }): Promise<boolean>;
8188
+ createMasterpiece(): Promise<boolean>;
8189
+ openStorage(): Promise<void>;
8190
+ print(): Promise<boolean>;
8191
+ browse(step: number): Promise<boolean>;
8192
+ startColouring(): Promise<boolean>;
8193
+ onOpen(listener: (kind: ArtStudioKind) => void): Unsubscribe;
8194
+ onClose(listener: (kind: ArtStudioKind) => void): Unsubscribe;
8195
+ onStroke(listener: (stroke: ArtStroke) => void): Unsubscribe;
8196
+ onToolChange(listener: (change: ArtToolChange) => void): Unsubscribe;
8197
+ onColorChange(listener: (change: ArtColorChange) => void): Unsubscribe;
8198
+ onClear(listener: (kind: ArtCanvasKind) => void): Unsubscribe;
8199
+ onSubmit(listener: (start: ArtSubmitStart) => void): Unsubscribe;
8200
+ onSubmitted(listener: (result: ArtSubmitResult) => void): Unsubscribe;
8201
+ onMasterpieceBought(listener: (bought: ArtMasterpieceBought) => void): Unsubscribe;
8202
+ onSaved(listener: (kind: ArtCanvasKind) => void): Unsubscribe;
8203
+ onBrowse(listener: (browsed: ArtBrowsed) => void): Unsubscribe;
8204
+ onPaintProgress(listener: (progress: ArtPaintProgress) => void): Unsubscribe;
8205
+ onPaintDone(listener: (result: ArtPaintResult) => void): Unsubscribe;
8206
+ private openStudio;
8207
+ private canvas;
8208
+ private read;
8209
+ private gameDefIdOf;
8210
+ private brushSizeOf;
8211
+ private cellSizeFor;
8212
+ private paint;
8213
+ private tellStroke;
8214
+ private tell;
8215
+ private hear;
8216
+ private follow;
8217
+ private manager;
8218
+ }
5819
8219
  type Phantom = {
5820
8220
  readonly avatar: AvatarApi;
5821
8221
  readonly player: PlayerApi;
@@ -5836,6 +8236,7 @@ type Phantom = {
5836
8236
  readonly adventures: AdventuresApi;
5837
8237
  readonly minigames: MinigamesApi;
5838
8238
  readonly achievements: AchievementsApi;
8239
+ readonly membership: MembershipApi;
5839
8240
  readonly currency: CurrencyApi;
5840
8241
  readonly dailyGift: DailyGiftApi;
5841
8242
  readonly sound: SoundApi;
@@ -5851,6 +8252,14 @@ type Phantom = {
5851
8252
  readonly localization: LocalizationApi;
5852
8253
  readonly ui: UiApi;
5853
8254
  readonly community: CommunityApi;
8255
+ readonly customRooms: CustomRoomsApi;
8256
+ readonly realtime: RealtimeApi;
8257
+ readonly journeyBook: JourneyBookApi;
8258
+ readonly referrals: ReferralsApi;
8259
+ readonly input: InputApi;
8260
+ readonly view: ViewApi;
8261
+ readonly looks: LooksApi;
8262
+ readonly artStudio: ArtStudioApi;
5854
8263
  readonly server: Side;
5855
8264
  readonly client: Side;
5856
8265
  readonly flash: PhantomFlash;
@@ -6029,7 +8438,8 @@ declare const NOT_FOR_PLUGINS: readonly [
6029
8438
  "avatar.view",
6030
8439
  "adventures.record",
6031
8440
  "content.replaceOnScreen",
6032
- "content.load"
8441
+ "content.load",
8442
+ "realtime.join"
6033
8443
  ];
6034
8444
  type SdkPath = Exclude<SdkPathOfSdk, (typeof NOT_FOR_PLUGINS)[number]>;
6035
8445
  declare const FRAME_MEMBERS: {
@@ -6040,6 +8450,7 @@ declare const FRAME_MEMBERS: {
6040
8450
  readonly "recipes.chatShortcuts": "flash";
6041
8451
  readonly "recipes.customChatBox": "flash";
6042
8452
  readonly "recipes.chatHistoryPanel": "flash";
8453
+ readonly "realtime.join": "sdk:realtime:act";
6043
8454
  };
6044
8455
  declare const SDK_PERMISSIONS: {
6045
8456
  readonly "avatar.position": "read";
@@ -6055,6 +8466,7 @@ declare const SDK_PERMISSIONS: {
6055
8466
  readonly "avatar.restoreColors": "act";
6056
8467
  readonly "avatar.pickColor": "act";
6057
8468
  readonly "avatar.paint": "act";
8469
+ readonly "avatar.paintColor": "act";
6058
8470
  readonly "avatar.act": "act";
6059
8471
  readonly "avatar.list": "read";
6060
8472
  readonly "avatar.switchTo": "act";
@@ -6083,6 +8495,38 @@ declare const SDK_PERMISSIONS: {
6083
8495
  readonly "avatar.setAirborne": "act";
6084
8496
  readonly "avatar.walkPath": "act";
6085
8497
  readonly "avatar.walkThrough": "act";
8498
+ readonly "avatar.create": "act";
8499
+ readonly "avatar.buySlot": "act";
8500
+ readonly "avatar.createFirst": "act";
8501
+ readonly "avatar.chooseUsable": "act";
8502
+ readonly "avatar.setPendingFlag": "act";
8503
+ readonly "avatar.canPayForPhoto": "read";
8504
+ readonly "avatar.payForPhoto": "act";
8505
+ readonly "avatar.definitionsLoaded": "read";
8506
+ readonly "avatar.loadDefinitions": "read";
8507
+ readonly "avatar.data": "read";
8508
+ readonly "avatar.inRoom": "read";
8509
+ readonly "avatar.findInRoom": "read";
8510
+ readonly "avatar.standingOf": "read";
8511
+ readonly "avatar.defaultLook": "read";
8512
+ readonly "avatar.buddyCardAvatar": "read";
8513
+ readonly "avatar.adventurePlayers": "read";
8514
+ readonly "avatar.offScreenPlayers": "read";
8515
+ readonly "avatar.lastSeenAt": "read";
8516
+ readonly "avatar.hosting": "read";
8517
+ readonly "avatar.isHostingAdventure": "read";
8518
+ readonly "avatar.suitsEnvironment": "read";
8519
+ readonly "avatar.roomState": "read";
8520
+ readonly "avatar.lastNameBar": "read";
8521
+ readonly "avatar.onList": "read";
8522
+ readonly "avatar.onRemoved": "read";
8523
+ readonly "avatar.onAdded": "read";
8524
+ readonly "avatar.onSlotBought": "read";
8525
+ readonly "avatar.onFirstCreated": "read";
8526
+ readonly "avatar.onNameBarChange": "read";
8527
+ readonly "avatar.onUsableChosen": "read";
8528
+ readonly "avatar.onPhotoChecked": "read";
8529
+ readonly "avatar.onPhotoTaken": "read";
6086
8530
  readonly "player.login": "read";
6087
8531
  readonly "player.onLogin": "read";
6088
8532
  readonly "player.userName": "read";
@@ -6109,6 +8553,25 @@ declare const SDK_PERMISSIONS: {
6109
8553
  readonly "player.invisible": "read";
6110
8554
  readonly "player.setInvisible": "act";
6111
8555
  readonly "player.settingOn": "read";
8556
+ readonly "player.onInvisibleChange": "read";
8557
+ readonly "player.state": "read";
8558
+ readonly "player.onChange": "read";
8559
+ readonly "player.record": "read";
8560
+ readonly "player.avatars": "read";
8561
+ readonly "player.avatarOf": "read";
8562
+ readonly "player.partyTimeLeft": "read";
8563
+ readonly "player.onPartyHosting": "read";
8564
+ readonly "player.onTradeListChange": "read";
8565
+ readonly "player.clothing": "read";
8566
+ readonly "player.denItemsForRoom": "read";
8567
+ readonly "player.petsInDen": "read";
8568
+ readonly "player.animalKindCount": "read";
8569
+ readonly "player.animalDefaults": "read";
8570
+ readonly "player.customAnimal": "read";
8571
+ readonly "player.customAnimalsOf": "read";
8572
+ readonly "player.animalOf": "read";
8573
+ readonly "player.denRoomDefinitions": "read";
8574
+ readonly "player.denRoomDefinition": "read";
6112
8575
  readonly "chat.recent": "read";
6113
8576
  readonly "chat.say": "act";
6114
8577
  readonly "chat.emote": "act";
@@ -6133,6 +8596,8 @@ declare const SDK_PERMISSIONS: {
6133
8596
  readonly "chat.showBalloon": "act";
6134
8597
  readonly "chat.log": "act";
6135
8598
  readonly "chat.clearLog": "act";
8599
+ readonly "chat.lastAdminMessage": "read";
8600
+ readonly "chat.lastModeration": "read";
6136
8601
  readonly "buddies.list": "read";
6137
8602
  readonly "buddies.online": "read";
6138
8603
  readonly "buddies.blocked": "read";
@@ -6158,6 +8623,14 @@ declare const SDK_PERMISSIONS: {
6158
8623
  readonly "buddies.showCard": "act";
6159
8624
  readonly "buddies.closeCard": "act";
6160
8625
  readonly "buddies.joinBuddyQuest": "act";
8626
+ readonly "buddies.requests": "read";
8627
+ readonly "buddies.onAddResult": "read";
8628
+ readonly "buddies.onBlockChange": "read";
8629
+ readonly "buddies.onList": "read";
8630
+ readonly "buddies.clientList": "read";
8631
+ readonly "buddies.clientBlocked": "read";
8632
+ readonly "buddies.hasBlocked": "read";
8633
+ readonly "buddies.cardTradeList": "read";
6161
8634
  readonly "ecards.inbox": "read";
6162
8635
  readonly "ecards.unread": "read";
6163
8636
  readonly "ecards.get": "read";
@@ -6185,6 +8658,11 @@ declare const SDK_PERMISSIONS: {
6185
8658
  readonly "ecards.closeInbox": "act";
6186
8659
  readonly "ecards.send": "act";
6187
8660
  readonly "ecards.discardGift": "act";
8661
+ readonly "ecards.lastBuddyAnswer": "read";
8662
+ readonly "ecards.onBuddyAnswer": "read";
8663
+ readonly "ecards.onInbox": "read";
8664
+ readonly "ecards.clientInbox": "read";
8665
+ readonly "ecards.clientInboxLoaded": "read";
6188
8666
  readonly "playerWall.posts": "read";
6189
8667
  readonly "playerWall.check": "read";
6190
8668
  readonly "playerWall.privacyOf": "read";
@@ -6209,6 +8687,19 @@ declare const SDK_PERMISSIONS: {
6209
8687
  readonly "playerWall.setParameters": "act";
6210
8688
  readonly "playerWall.showPostAs": "act";
6211
8689
  readonly "playerWall.removeMasterpiece": "act";
8690
+ readonly "playerWall.hasOpenedOwnWall": "read";
8691
+ readonly "playerWall.hasCountedVisit": "read";
8692
+ readonly "playerWall.likes": "read";
8693
+ readonly "playerWall.onAccess": "read";
8694
+ readonly "playerWall.onPrivacy": "read";
8695
+ readonly "playerWall.onPrivacyChange": "read";
8696
+ readonly "playerWall.onParametersChange": "read";
8697
+ readonly "playerWall.onVisitCounted": "read";
8698
+ readonly "playerWall.onLikes": "read";
8699
+ readonly "playerWall.onLiked": "read";
8700
+ readonly "playerWall.onServiceRequest": "read";
8701
+ readonly "playerWall.requestPermissions": "act";
8702
+ readonly "playerWall.like": "act";
6212
8703
  readonly "dailyGift.daysInCycle": "read";
6213
8704
  readonly "dailyGift.statId": "read";
6214
8705
  readonly "dailyGift.received": "read";
@@ -6254,6 +8745,9 @@ declare const SDK_PERMISSIONS: {
6254
8745
  readonly "feedback.close": "act";
6255
8746
  readonly "reports.report": "act";
6256
8747
  readonly "reports.reportContent": "act";
8748
+ readonly "reports.onReportResult": "read";
8749
+ readonly "reports.onContentReportResult": "read";
8750
+ readonly "reports.onReportSent": "read";
6257
8751
  readonly "newspaper.definitions": "read";
6258
8752
  readonly "newspaper.dataOf": "read";
6259
8753
  readonly "newspaper.hasUnseenPages": "read";
@@ -6261,8 +8755,15 @@ declare const SDK_PERMISSIONS: {
6261
8755
  readonly "newspaper.onPageSeen": "read";
6262
8756
  readonly "newspaper.markSeen": "act";
6263
8757
  readonly "newspaper.open": "act";
8758
+ readonly "newspaper.definition": "read";
6264
8759
  readonly "masterpieces.itemsOf": "read";
6265
8760
  readonly "masterpieces.creatorOf": "read";
8761
+ readonly "masterpieces.likes": "read";
8762
+ readonly "masterpieces.onItems": "read";
8763
+ readonly "masterpieces.onCreator": "read";
8764
+ readonly "masterpieces.onLikes": "read";
8765
+ readonly "masterpieces.onLiked": "read";
8766
+ readonly "masterpieces.like": "act";
6266
8767
  readonly "trades.offer": "read";
6267
8768
  readonly "trades.onOffer": "read";
6268
8769
  readonly "trades.onConfirmRequest": "read";
@@ -6282,6 +8783,10 @@ declare const SDK_PERMISSIONS: {
6282
8783
  readonly "trades.heldList": "read";
6283
8784
  readonly "trades.setBusy": "act";
6284
8785
  readonly "trades.onList": "read";
8786
+ readonly "trades.onListChanged": "read";
8787
+ readonly "trades.offerDraft": "read";
8788
+ readonly "trades.counts": "read";
8789
+ readonly "trades.listEntry": "read";
6285
8790
  readonly "inventory.items": "read";
6286
8791
  readonly "inventory.owned": "read";
6287
8792
  readonly "inventory.worn": "read";
@@ -6295,6 +8800,10 @@ declare const SDK_PERMISSIONS: {
6295
8800
  readonly "inventory.recycle": "act";
6296
8801
  readonly "inventory.wearableBy": "read";
6297
8802
  readonly "inventory.limits": "read";
8803
+ readonly "inventory.avatarSlots": "read";
8804
+ readonly "inventory.onAvatarSlot": "read";
8805
+ readonly "inventory.latestPrize": "read";
8806
+ readonly "inventory.onPrize": "read";
6298
8807
  readonly "shops.offering": "read";
6299
8808
  readonly "shops.definition": "read";
6300
8809
  readonly "shops.listType": "read";
@@ -6314,6 +8823,8 @@ declare const SDK_PERMISSIONS: {
6314
8823
  readonly "shops.isAvailable": "read";
6315
8824
  readonly "shops.onOpen": "read";
6316
8825
  readonly "shops.buyDiamondBundle": "act";
8826
+ readonly "shops.onDiamondBundleBuy": "read";
8827
+ readonly "shops.picture": "read";
6317
8828
  readonly "pets.list": "read";
6318
8829
  readonly "pets.active": "read";
6319
8830
  readonly "pets.activeName": "read";
@@ -6346,6 +8857,30 @@ declare const SDK_PERMISSIONS: {
6346
8857
  readonly "pets.nameEggPet": "act";
6347
8858
  readonly "pets.create": "act";
6348
8859
  readonly "pets.randomAppearance": "read";
8860
+ readonly "pets.buy": "act";
8861
+ readonly "pets.restyle": "act";
8862
+ readonly "pets.adoptionChecklistOf": "read";
8863
+ readonly "pets.adoptionCountOf": "read";
8864
+ readonly "pets.adoptionCardDefs": "read";
8865
+ readonly "pets.adoptionCardTotal": "read";
8866
+ readonly "pets.hasAdoptionCards": "read";
8867
+ readonly "pets.definitions": "read";
8868
+ readonly "pets.unlockedKinds": "read";
8869
+ readonly "pets.goesOnLandAndInOcean": "read";
8870
+ readonly "pets.goesWith": "read";
8871
+ readonly "pets.enviroTypeOf": "read";
8872
+ readonly "pets.isGroundType": "read";
8873
+ readonly "pets.kindOfBits": "read";
8874
+ readonly "pets.listAsItems": "read";
8875
+ readonly "pets.picture": "read";
8876
+ readonly "pets.onCreated": "read";
8877
+ readonly "pets.onEggNamed": "read";
8878
+ readonly "pets.onMasteryBadge": "read";
8879
+ readonly "pets.onRestyled": "read";
8880
+ readonly "pets.onUnlocked": "read";
8881
+ readonly "pets.onAdoptionChecklist": "read";
8882
+ readonly "pets.onAdoptionCount": "read";
8883
+ readonly "pets.onDefinitionsLoaded": "read";
6349
8884
  readonly "room.players.list": "read";
6350
8885
  readonly "room.players.count": "read";
6351
8886
  readonly "room.players.get": "read";
@@ -6358,6 +8893,7 @@ declare const SDK_PERMISSIONS: {
6358
8893
  readonly "room.current": "read";
6359
8894
  readonly "room.details": "read";
6360
8895
  readonly "room.layout": "read";
8896
+ readonly "room.onLayout": "read";
6361
8897
  readonly "room.focusCamera": "act";
6362
8898
  readonly "room.stopWalking": "act";
6363
8899
  readonly "room.scene": "read";
@@ -6392,6 +8928,15 @@ declare const SDK_PERMISSIONS: {
6392
8928
  readonly "room.layers": "read";
6393
8929
  readonly "room.showAvatars": "act";
6394
8930
  readonly "room.reload": "act";
8931
+ readonly "room.players.pathOf": "read";
8932
+ readonly "room.onWorldItemTaken": "read";
8933
+ readonly "room.joiningInvisibly": "read";
8934
+ readonly "room.darkAreas": "read";
8935
+ readonly "room.nearestEmptyCell": "read";
8936
+ readonly "room.journeyBookItemsLeft": "read";
8937
+ readonly "room.objectAt": "read";
8938
+ readonly "room.setJamaaTime": "act";
8939
+ readonly "room.setDenKickNotice": "act";
6395
8940
  readonly "dens.join": "act";
6396
8941
  readonly "dens.joinOwn": "act";
6397
8942
  readonly "dens.isOwnDen": "read";
@@ -6424,6 +8969,40 @@ declare const SDK_PERMISSIONS: {
6424
8969
  readonly "dens.ecoState": "read";
6425
8970
  readonly "dens.redeemEcoCredits": "act";
6426
8971
  readonly "dens.setEcoConsumer": "act";
8972
+ readonly "dens.inOwnDen": "read";
8973
+ readonly "dens.guests": "read";
8974
+ readonly "dens.onGuestArrive": "read";
8975
+ readonly "dens.onVisit": "read";
8976
+ readonly "dens.onGuestLeave": "read";
8977
+ readonly "dens.onOwnDen": "read";
8978
+ readonly "dens.roomChange": "read";
8979
+ readonly "dens.kickedAt": "read";
8980
+ readonly "dens.lastPurchase": "read";
8981
+ readonly "dens.onPurchase": "read";
8982
+ readonly "dens.lastSale": "read";
8983
+ readonly "dens.onSale": "read";
8984
+ readonly "dens.emptiedAt": "read";
8985
+ readonly "dens.onEmptied": "read";
8986
+ readonly "dens.epicDens": "read";
8987
+ readonly "dens.onEpicDens": "read";
8988
+ readonly "dens.setPhantom": "act";
8989
+ readonly "dens.onPhantom": "read";
8990
+ readonly "dens.lastEcoState": "read";
8991
+ readonly "dens.onEcoState": "read";
8992
+ readonly "dens.lastEcoRedemption": "read";
8993
+ readonly "dens.onEcoCreditsRedeemed": "read";
8994
+ readonly "dens.ecoConsumers": "read";
8995
+ readonly "dens.onEcoConsumers": "read";
8996
+ readonly "dens.activeDenIdx": "read";
8997
+ readonly "dens.onItemList": "read";
8998
+ readonly "dens.serverState": "read";
8999
+ readonly "dens.onState": "read";
9000
+ readonly "dens.saveItems": "act";
9001
+ readonly "dens.onSaved": "read";
9002
+ readonly "dens.onSaving": "read";
9003
+ readonly "dens.isChangePending": "read";
9004
+ readonly "dens.openDenShopId": "read";
9005
+ readonly "dens.heldDenShop": "read";
6427
9006
  readonly "denShop.offering": "read";
6428
9007
  readonly "denShop.onChange": "read";
6429
9008
  readonly "denShop.onBuy": "read";
@@ -6431,6 +9010,11 @@ declare const SDK_PERMISSIONS: {
6431
9010
  readonly "denShop.reprice": "act";
6432
9011
  readonly "denShop.unlist": "act";
6433
9012
  readonly "denShop.buy": "act";
9013
+ readonly "denShop.onOffering": "read";
9014
+ readonly "denShop.onSale": "read";
9015
+ readonly "denShop.inDen": "read";
9016
+ readonly "denShop.update": "act";
9017
+ readonly "shops.knownShops": "read";
6434
9018
  readonly "world.serverNode": "read";
6435
9019
  readonly "world.shardId": "read";
6436
9020
  readonly "world.shards": "read";
@@ -6459,6 +9043,22 @@ declare const SDK_PERMISSIONS: {
6459
9043
  readonly "world.showParties": "act";
6460
9044
  readonly "world.onRoomList": "read";
6461
9045
  readonly "world.onRandomKey": "read";
9046
+ readonly "world.rooms": "read";
9047
+ readonly "world.randomKey": "read";
9048
+ readonly "world.lastNodeHop": "read";
9049
+ readonly "world.lastPartyJoin": "read";
9050
+ readonly "world.hosting": "read";
9051
+ readonly "world.onHostResult": "read";
9052
+ readonly "world.onCustomParties": "read";
9053
+ readonly "world.onShards": "read";
9054
+ readonly "world.onHostingTimeLeft": "read";
9055
+ readonly "world.partyDefinitions": "read";
9056
+ readonly "world.canUseAvatarHere": "read";
9057
+ readonly "world.partyMasterpieces": "read";
9058
+ readonly "world.onPartyMasterpieces": "read";
9059
+ readonly "world.onFirstFiveMinutesRoom": "read";
9060
+ readonly "world.requestFirstFiveMinutesRoom": "act";
9061
+ readonly "world.joinNamedRoom": "act";
6462
9062
  readonly "session.connected": "read";
6463
9063
  readonly "session.mode": "read";
6464
9064
  readonly "session.server": "read";
@@ -6468,6 +9068,13 @@ declare const SDK_PERMISSIONS: {
6468
9068
  readonly "session.disconnect": "act";
6469
9069
  readonly "session.requestList": "read";
6470
9070
  readonly "session.onList": "read";
9071
+ readonly "session.inMinigame": "read";
9072
+ readonly "session.settingsUserName": "read";
9073
+ readonly "session.sendEmailActivation": "act";
9074
+ readonly "session.onEmailActivation": "read";
9075
+ readonly "session.onEmailActivationRequest": "read";
9076
+ readonly "session.emailValidated": "read";
9077
+ readonly "session.onEmailValidated": "read";
6471
9078
  readonly "assets.deployVersion": "read";
6472
9079
  readonly "assets.buildVersion": "read";
6473
9080
  readonly "assets.loadMedia": "read";
@@ -6583,6 +9190,89 @@ declare const SDK_PERMISSIONS: {
6583
9190
  readonly "adventures.onPlantAte": "read";
6584
9191
  readonly "adventures.onPlantEatRecoil": "read";
6585
9192
  readonly "adventures.canPlaySideScroll": "act";
9193
+ readonly "adventures.experience": "read";
9194
+ readonly "adventures.playerLevel": "read";
9195
+ readonly "adventures.departedPlayers": "read";
9196
+ readonly "adventures.defeatedPlayers": "read";
9197
+ readonly "adventures.awards": "read";
9198
+ readonly "adventures.givenItems": "read";
9199
+ readonly "adventures.exitConfirmed": "read";
9200
+ readonly "adventures.lastBundle": "read";
9201
+ readonly "adventures.actorIconShowing": "read";
9202
+ readonly "adventures.actorSeeking": "read";
9203
+ readonly "adventures.disguise": "read";
9204
+ readonly "adventures.seeds": "read";
9205
+ readonly "adventures.plants": "read";
9206
+ readonly "adventures.combatStats": "read";
9207
+ readonly "adventures.volumeProgress": "read";
9208
+ readonly "adventures.attackTarget": "read";
9209
+ readonly "adventures.playerRoom": "read";
9210
+ readonly "adventures.sideScrollPosition": "read";
9211
+ readonly "adventures.actorTorch": "read";
9212
+ readonly "adventures.playerTorch": "read";
9213
+ readonly "adventures.music": "read";
9214
+ readonly "adventures.cutscene": "read";
9215
+ readonly "adventures.preloadedCutscenes": "read";
9216
+ readonly "adventures.soundPacks": "read";
9217
+ readonly "adventures.screenFaded": "read";
9218
+ readonly "adventures.lastZap": "read";
9219
+ readonly "adventures.lastLaunch": "read";
9220
+ readonly "adventures.respawnsGranted": "read";
9221
+ readonly "adventures.shaking": "read";
9222
+ readonly "adventures.lastSound": "read";
9223
+ readonly "adventures.pageViews": "read";
9224
+ readonly "adventures.clientStatus": "read";
9225
+ readonly "adventures.actorPathToPlayer": "read";
9226
+ readonly "adventures.onActorSpawned": "read";
9227
+ readonly "adventures.onActorMoved": "read";
9228
+ readonly "adventures.onActorHealth": "read";
9229
+ readonly "adventures.onActorDied": "read";
9230
+ readonly "adventures.onActorRestored": "read";
9231
+ readonly "adventures.onActorSwfState": "read";
9232
+ readonly "adventures.onActorPath": "read";
9233
+ readonly "adventures.onCommand": "read";
9234
+ readonly "adventures.onVariable": "read";
9235
+ readonly "adventures.onPickUpResult": "read";
9236
+ readonly "adventures.onMovedItems": "read";
9237
+ readonly "adventures.onCrystalCount": "read";
9238
+ readonly "adventures.onSentOut": "read";
9239
+ readonly "adventures.onLobbyWaiting": "read";
9240
+ readonly "adventures.onLobbyLeft": "read";
9241
+ readonly "adventures.onPlayerAttacked": "read";
9242
+ readonly "adventures.onBeamZap": "read";
9243
+ readonly "adventures.onPhantomZap": "read";
9244
+ readonly "adventures.onThrow": "read";
9245
+ readonly "adventures.onSwing": "read";
9246
+ readonly "adventures.onRespawnGranted": "read";
9247
+ readonly "adventures.onPlayerRoomChange": "read";
9248
+ readonly "adventures.onSideScroll": "read";
9249
+ readonly "adventures.onTorch": "read";
9250
+ readonly "adventures.onCutscene": "read";
9251
+ readonly "adventures.onCutscenePreload": "read";
9252
+ readonly "adventures.onFade": "read";
9253
+ readonly "adventures.onShake": "read";
9254
+ readonly "adventures.onSound": "read";
9255
+ readonly "adventures.onMusic": "read";
9256
+ readonly "adventures.onSoundPack": "read";
9257
+ readonly "adventures.onPageView": "read";
9258
+ readonly "adventures.movedItems": "read";
9259
+ readonly "adventures.reportHit": "act";
9260
+ readonly "adventures.reportPlayerHit": "act";
9261
+ readonly "adventures.reportAttackOnPlayer": "act";
9262
+ readonly "adventures.reportActorPosition": "act";
9263
+ readonly "adventures.requestActorSeek": "act";
9264
+ readonly "adventures.untrigger": "act";
9265
+ readonly "adventures.reportBeamZap": "act";
9266
+ readonly "adventures.reportPhantomZap": "act";
9267
+ readonly "adventures.reportDestructibleHit": "act";
9268
+ readonly "adventures.reportPlantAte": "act";
9269
+ readonly "adventures.reportThrow": "act";
9270
+ readonly "adventures.reportSwing": "act";
9271
+ readonly "adventures.finishCutscene": "act";
9272
+ readonly "adventures.requestRespawn": "act";
9273
+ readonly "adventures.finishMinigame": "act";
9274
+ readonly "adventures.finishRoomMinigame": "act";
9275
+ readonly "adventures.reportSideScroll": "act";
6586
9276
  readonly "minigames.current": "read";
6587
9277
  readonly "minigames.isPlaying": "read";
6588
9278
  readonly "minigames.play": "act";
@@ -6620,6 +9310,20 @@ declare const SDK_PERMISSIONS: {
6620
9310
  readonly "minigames.offerPvp": "act";
6621
9311
  readonly "minigames.joinOfferedPvp": "act";
6622
9312
  readonly "minigames.chat": "act";
9313
+ readonly "minigames.onLeaderboard": "read";
9314
+ readonly "minigames.clientLeaderboard": "read";
9315
+ readonly "minigames.lastJoin": "read";
9316
+ readonly "minigames.pvpInvite": "read";
9317
+ readonly "minigames.serials": "read";
9318
+ readonly "minigames.onGemSerial": "read";
9319
+ readonly "minigames.onMasterySerial": "read";
9320
+ readonly "minigames.onGemAward": "read";
9321
+ readonly "minigames.onPetMasteryAward": "read";
9322
+ readonly "minigames.onScore": "read";
9323
+ readonly "minigames.quit": "act";
9324
+ readonly "minigames.playerInfo": "read";
9325
+ readonly "minigames.gameNameId": "read";
9326
+ readonly "minigames.isMemberAccountType": "read";
6623
9327
  readonly "minigames.ticTacToe.board": "read";
6624
9328
  readonly "minigames.ticTacToe.opponent": "read";
6625
9329
  readonly "minigames.ticTacToe.myTurn": "read";
@@ -6671,6 +9375,16 @@ declare const SDK_PERMISSIONS: {
6671
9375
  readonly "achievements.readStats": "read";
6672
9376
  readonly "achievements.statBit": "read";
6673
9377
  readonly "achievements.statType": "read";
9378
+ readonly "achievements.earn": "act";
9379
+ readonly "achievements.onStats": "read";
9380
+ readonly "achievements.definitionsByType": "read";
9381
+ readonly "membership.real": "read";
9382
+ readonly "membership.onChange": "read";
9383
+ readonly "membership.shown": "read";
9384
+ readonly "membership.showing": "read";
9385
+ readonly "membership.onShowing": "read";
9386
+ readonly "membership.show": "act";
9387
+ readonly "membership.stopShowing": "act";
6674
9388
  readonly "currency.gems": "read";
6675
9389
  readonly "currency.tickets": "read";
6676
9390
  readonly "currency.diamonds": "read";
@@ -6689,6 +9403,8 @@ declare const SDK_PERMISSIONS: {
6689
9403
  readonly "currency.exchange": "act";
6690
9404
  readonly "currency.onExchange": "read";
6691
9405
  readonly "currency.onDonate": "read";
9406
+ readonly "currency.diamondsLoaded": "read";
9407
+ readonly "currency.diamondDefinitionId": "read";
6692
9408
  readonly "gui.tree": "read";
6693
9409
  readonly "gui.find": "read";
6694
9410
  readonly "gui.findAll": "read";
@@ -6762,6 +9478,9 @@ declare const SDK_PERMISSIONS: {
6762
9478
  readonly "screens.denSwitcherIndex": "read";
6763
9479
  readonly "screens.serverName": "read";
6764
9480
  readonly "ui.skin": "act";
9481
+ readonly "ui.status": "read";
9482
+ readonly "ui.ready": "read";
9483
+ readonly "ui.readyTimeoutMs": "act";
6765
9484
  readonly "ui.theme": "read";
6766
9485
  readonly "ui.symbols": "read";
6767
9486
  readonly "ui.hasSymbol": "read";
@@ -6810,28 +9529,160 @@ declare const SDK_PERMISSIONS: {
6810
9529
  readonly "localization.languageId": "read";
6811
9530
  readonly "localization.onLanguageChange": "read";
6812
9531
  readonly "localization.onReady": "read";
9532
+ readonly "localization.accountLanguage": "read";
9533
+ readonly "localization.languageForLocale": "read";
9534
+ readonly "localization.sortingLocale": "read";
9535
+ readonly "localization.numberLocale": "read";
9536
+ readonly "localization.countryCode": "read";
6813
9537
  readonly "content.available": "read";
6814
9538
  readonly "content.replacements": "read";
6815
9539
  readonly "content.onRequest": "read";
6816
9540
  readonly "content.replace": "act";
6817
9541
  readonly "content.restore": "act";
6818
9542
  readonly "community.available": "read";
6819
- readonly "community.status": "read";
6820
- readonly "community.onStatus": "read";
6821
- readonly "community.members": "read";
6822
- readonly "community.onMembers": "read";
6823
- readonly "community.onMessage": "read";
6824
- readonly "community.online": "read";
6825
- readonly "community.join": "act";
6826
- readonly "community.leave": "act";
6827
- readonly "community.say": "act";
9543
+ readonly "community.hidden": "read";
9544
+ readonly "community.onHidden": "read";
9545
+ readonly "community.hide": "act";
9546
+ readonly "community.unhide": "act";
6828
9547
  readonly "community.report": "act";
6829
- readonly "community.captureChat": "act";
6830
- readonly "community.invite": "act";
6831
- readonly "community.askToJoin": "act";
6832
- readonly "community.answer": "act";
6833
- readonly "community.onRequest": "read";
6834
- readonly "community.onAnswered": "read";
9548
+ readonly "customRooms.available": "read";
9549
+ readonly "customRooms.current": "read";
9550
+ readonly "customRooms.onEnter": "read";
9551
+ readonly "customRooms.onLeave": "read";
9552
+ readonly "customRooms.onMove": "read";
9553
+ readonly "customRooms.onChat": "read";
9554
+ readonly "customRooms.onPropEnter": "read";
9555
+ readonly "customRooms.onPropLeave": "read";
9556
+ readonly "customRooms.onPropNear": "read";
9557
+ readonly "customRooms.onPropClick": "read";
9558
+ readonly "customRooms.shared": "read";
9559
+ readonly "customRooms.define": "act";
9560
+ readonly "customRooms.remove": "act";
9561
+ readonly "customRooms.enter": "act";
9562
+ readonly "customRooms.leave": "act";
9563
+ readonly "realtime.available": "read";
9564
+ readonly "realtime.status": "read";
9565
+ readonly "realtime.onStatus": "read";
9566
+ readonly "realtime.channels": "read";
9567
+ readonly "realtime.members": "read";
9568
+ readonly "realtime.state": "read";
9569
+ readonly "realtime.presence": "read";
9570
+ readonly "realtime.host": "read";
9571
+ readonly "realtime.onMessage": "read";
9572
+ readonly "realtime.onJoin": "read";
9573
+ readonly "realtime.onLeave": "read";
9574
+ readonly "realtime.onState": "read";
9575
+ readonly "realtime.onPresence": "read";
9576
+ readonly "realtime.onHost": "read";
9577
+ readonly "realtime.onClose": "read";
9578
+ readonly "realtime.open": "act";
9579
+ readonly "realtime.leave": "act";
9580
+ readonly "realtime.send": "act";
9581
+ readonly "realtime.sendTo": "act";
9582
+ readonly "realtime.onAsk": "read";
9583
+ readonly "realtime.ask": "act";
9584
+ readonly "realtime.answer": "act";
9585
+ readonly "realtime.decline": "act";
9586
+ readonly "realtime.setState": "act";
9587
+ readonly "realtime.setPresence": "act";
9588
+ readonly "realtime.giveHost": "act";
9589
+ readonly "journeyBook.counts": "read";
9590
+ readonly "journeyBook.unseenPages": "read";
9591
+ readonly "journeyBook.unclaimedGifts": "read";
9592
+ readonly "journeyBook.onChange": "read";
9593
+ readonly "journeyBook.open": "act";
9594
+ readonly "referrals.code": "read";
9595
+ readonly "referrals.clientCode": "read";
9596
+ readonly "referrals.fetchCode": "read";
9597
+ readonly "referrals.hasReferrer": "read";
9598
+ readonly "referrals.list": "read";
9599
+ readonly "referrals.onCode": "read";
9600
+ readonly "referrals.onHasReferrer": "read";
9601
+ readonly "referrals.onReferrerNamed": "read";
9602
+ readonly "referrals.onList": "read";
9603
+ readonly "referrals.nameReferrer": "act";
9604
+ readonly "avatar.noClip": "read";
9605
+ readonly "avatar.onNoClip": "read";
9606
+ readonly "input.bound": "read";
9607
+ readonly "input.onShortcut": "read";
9608
+ readonly "input.bind": "act";
9609
+ readonly "input.unbind": "act";
9610
+ readonly "view.state": "read";
9611
+ readonly "view.zoom": "read";
9612
+ readonly "view.zoomLimits": "read";
9613
+ readonly "view.onChange": "read";
9614
+ readonly "view.setZoom": "act";
9615
+ readonly "view.resetZoom": "act";
9616
+ readonly "view.showInterface": "act";
9617
+ readonly "view.showOwnAvatar": "act";
9618
+ readonly "view.showOwnNameTag": "act";
9619
+ readonly "session.markActive": "act";
9620
+ readonly "session.keepActive": "act";
9621
+ readonly "session.stopKeepingActive": "act";
9622
+ readonly "session.keepingActive": "read";
9623
+ readonly "session.onIdleWarning": "read";
9624
+ readonly "popups.skipAtLogin": "act";
9625
+ readonly "popups.stopSkippingAtLogin": "act";
9626
+ readonly "popups.skippingAtLogin": "read";
9627
+ readonly "popups.onSkipped": "read";
9628
+ readonly "gui.pinCurrency": "act";
9629
+ readonly "gui.unpinCurrency": "act";
9630
+ readonly "gui.currencyPinned": "read";
9631
+ readonly "dens.placement": "read";
9632
+ readonly "dailyGift.unwrap": "act";
9633
+ readonly "dailyGift.onOpen": "read";
9634
+ readonly "dailyGift.wheelOpen": "read";
9635
+ readonly "dailyGift.spinWheel": "act";
9636
+ readonly "dailyGift.onWheelOpen": "read";
9637
+ readonly "buddies.whereabouts": "read";
9638
+ readonly "buddies.whereaboutsOf": "read";
9639
+ readonly "buddies.onWhereabouts": "read";
9640
+ readonly "world.roomDefinitions": "read";
9641
+ readonly "looks.current": "read";
9642
+ readonly "looks.of": "read";
9643
+ readonly "looks.plan": "read";
9644
+ readonly "looks.onChange": "read";
9645
+ readonly "looks.putOn": "act";
9646
+ readonly "artStudio.isOpen": "read";
9647
+ readonly "artStudio.current": "read";
9648
+ readonly "artStudio.state": "read";
9649
+ readonly "artStudio.palette": "read";
9650
+ readonly "artStudio.picture": "read";
9651
+ readonly "artStudio.painting": "read";
9652
+ readonly "artStudio.planPainting": "read";
9653
+ readonly "artStudio.onOpen": "read";
9654
+ readonly "artStudio.onClose": "read";
9655
+ readonly "artStudio.onStroke": "read";
9656
+ readonly "artStudio.onToolChange": "read";
9657
+ readonly "artStudio.onColorChange": "read";
9658
+ readonly "artStudio.onClear": "read";
9659
+ readonly "artStudio.onSubmit": "read";
9660
+ readonly "artStudio.onSubmitted": "read";
9661
+ readonly "artStudio.onMasterpieceBought": "read";
9662
+ readonly "artStudio.onSaved": "read";
9663
+ readonly "artStudio.onBrowse": "read";
9664
+ readonly "artStudio.onPaintProgress": "read";
9665
+ readonly "artStudio.onPaintDone": "read";
9666
+ readonly "artStudio.open": "act";
9667
+ readonly "artStudio.close": "act";
9668
+ readonly "artStudio.setTool": "act";
9669
+ readonly "artStudio.setBrushSize": "act";
9670
+ readonly "artStudio.setColor": "act";
9671
+ readonly "artStudio.stroke": "act";
9672
+ readonly "artStudio.shape": "act";
9673
+ readonly "artStudio.fill": "act";
9674
+ readonly "artStudio.setCells": "act";
9675
+ readonly "artStudio.clear": "act";
9676
+ readonly "artStudio.undo": "act";
9677
+ readonly "artStudio.paintImage": "act";
9678
+ readonly "artStudio.startPainting": "act";
9679
+ readonly "artStudio.stopPainting": "act";
9680
+ readonly "artStudio.submit": "act";
9681
+ readonly "artStudio.createMasterpiece": "act";
9682
+ readonly "artStudio.openStorage": "act";
9683
+ readonly "artStudio.print": "act";
9684
+ readonly "artStudio.browse": "act";
9685
+ readonly "artStudio.startColouring": "act";
6835
9686
  };
6836
9687
  declare function isEventPath(path: string): boolean;
6837
9688
  declare function isSdkPath(path: string): path is SdkPath;
@@ -8780,16 +11631,22 @@ declare const permissionsSchema: ZodDefault<ZodObject<{
8780
11631
  room: "room";
8781
11632
  currency: "currency";
8782
11633
  inventory: "inventory";
11634
+ referrals: "referrals";
11635
+ input: "input";
8783
11636
  gui: "gui";
8784
11637
  content: "content";
11638
+ chat: "chat";
8785
11639
  world: "world";
8786
11640
  localization: "localization";
8787
- chat: "chat";
11641
+ newspaper: "newspaper";
8788
11642
  popups: "popups";
11643
+ artStudio: "artStudio";
8789
11644
  masterpieces: "masterpieces";
11645
+ journeyBook: "journeyBook";
8790
11646
  session: "session";
8791
- newspaper: "newspaper";
8792
11647
  community: "community";
11648
+ customRooms: "customRooms";
11649
+ realtime: "realtime";
8793
11650
  ecards: "ecards";
8794
11651
  playerWall: "playerWall";
8795
11652
  trades: "trades";
@@ -8799,6 +11656,7 @@ declare const permissionsSchema: ZodDefault<ZodObject<{
8799
11656
  assets: "assets";
8800
11657
  adventures: "adventures";
8801
11658
  minigames: "minigames";
11659
+ membership: "membership";
8802
11660
  dailyGift: "dailyGift";
8803
11661
  sound: "sound";
8804
11662
  feedback: "feedback";
@@ -8806,6 +11664,8 @@ declare const permissionsSchema: ZodDefault<ZodObject<{
8806
11664
  editor: "editor";
8807
11665
  screens: "screens";
8808
11666
  ui: "ui";
11667
+ view: "view";
11668
+ looks: "looks";
8809
11669
  }> & $partial, ZodEnum<{
8810
11670
  read: "read";
8811
11671
  act: "act";
@@ -8825,8 +11685,10 @@ type PluginPermissions = output<typeof permissionsSchema>;
8825
11685
  type Scope = SdkScope | "packets:watch" | "packets:send" | "packets:modify" | "flash" | "clipboard:write" | "notifications" | `network:${string}`;
8826
11686
  declare const SDK_AREAS: readonly [
8827
11687
  "player",
11688
+ "membership",
8828
11689
  "reports",
8829
11690
  "avatar",
11691
+ "looks",
8830
11692
  "room",
8831
11693
  "world",
8832
11694
  "session",
@@ -8838,6 +11700,7 @@ declare const SDK_AREAS: readonly [
8838
11700
  "ecards",
8839
11701
  "playerWall",
8840
11702
  "trades",
11703
+ "referrals",
8841
11704
  "inventory",
8842
11705
  "shops",
8843
11706
  "pets",
@@ -8846,6 +11709,7 @@ declare const SDK_AREAS: readonly [
8846
11709
  "achievements",
8847
11710
  "adventures",
8848
11711
  "minigames",
11712
+ "journeyBook",
8849
11713
  "gui",
8850
11714
  "editor",
8851
11715
  "popups",
@@ -8857,7 +11721,12 @@ declare const SDK_AREAS: readonly [
8857
11721
  "newspaper",
8858
11722
  "masterpieces",
8859
11723
  "content",
8860
- "community"
11724
+ "customRooms",
11725
+ "community",
11726
+ "realtime",
11727
+ "input",
11728
+ "view",
11729
+ "artStudio"
8861
11730
  ];
8862
11731
  type ScopeRisk = "low" | "medium" | "high" | "full";
8863
11732
  declare function scopesOf(permissions: PluginPermissions): Scope[];
@@ -9092,7 +11961,7 @@ type PluginContext = {
9092
11961
  openUrl(url: string): Promise<void>;
9093
11962
  log(...values: unknown[]): void;
9094
11963
  };
9095
- type PluginPhantom = Omit<RemoteSdk, "avatar" | "adventures" | "content" | "ui"> & {
11964
+ type PluginPhantom = Omit<RemoteSdk, "avatar" | "adventures" | "content" | "ui" | "realtime"> & {
9096
11965
  readonly avatar: RemoteSdk["avatar"] & {
9097
11966
  view(): Promise<FlashHandle>;
9098
11967
  };
@@ -9100,6 +11969,9 @@ type PluginPhantom = Omit<RemoteSdk, "avatar" | "adventures" | "content" | "ui">
9100
11969
  record(): AdventureRecorder;
9101
11970
  };
9102
11971
  readonly content: RemoteSdk["content"] & Pick<ContentApi, "load" | "replaceOnScreen">;
11972
+ readonly realtime: RemoteSdk["realtime"] & {
11973
+ join<Data = unknown, State extends RealtimeObject = RealtimeObject, Presence extends RealtimeObject = RealtimeObject>(spec: RealtimeChannelSpec, options?: RealtimeJoinOptions<Presence>): Promise<RealtimeChannel<Data, State, Presence>>;
11974
+ };
9103
11975
  readonly ui: UiApi;
9104
11976
  readonly recipes: PluginRecipes;
9105
11977
  readonly id: string;
@@ -9153,4 +12025,4 @@ type ActionResult = {
9153
12025
  type CommandView = {
9154
12026
  props: Record<string, unknown>;
9155
12027
  };
9156
- export { DEV_MANIFEST_PATH, DEV_PORT, FRAME_MEMBERS, FRAME_PAGE, NOT_FOR_PLUGINS, PLUGIN_FLASH_IDS_PER_FRAME, PLUGIN_FLASH_IDS_START, PROTOCOL, PluginError, RUNTIME_SCRIPT, RUNTIME_STYLES, SDK_AREAS, SDK_PERMISSIONS, definePlugin, describeScope, isEventPath, isFrameMessage, isHostMessage, isSdkPath, pluginUrl, scopeOfPath, scopeRisk, scopesOf };
12028
+ export { DEV_MANIFEST_PATH, DEV_PORT, FRAME_MEMBERS, FRAME_PAGE, NOT_FOR_PLUGINS, PLUGIN_FLASH_IDS_PER_FRAME, PLUGIN_FLASH_IDS_START, PROTOCOL, PluginError, RUNTIME_SCRIPT, RUNTIME_STYLES, RealtimeAskError, SDK_AREAS, SDK_PERMISSIONS, definePlugin, describeScope, isEventPath, isFrameMessage, isHostMessage, isSdkPath, pluginUrl, scopeOfPath, scopeRisk, scopesOf };