@lootlog/sdk 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/activity.d.ts +8 -2
  2. package/dist/activity.d.ts.map +1 -1
  3. package/dist/activity.js +2 -2
  4. package/dist/activity.js.map +1 -1
  5. package/dist/battlelog.d.ts +280 -5
  6. package/dist/battlelog.d.ts.map +1 -1
  7. package/dist/battlelog.js +11 -6
  8. package/dist/battlelog.js.map +1 -1
  9. package/dist/index.d.ts +1 -1
  10. package/dist/index.js +1 -1
  11. package/dist/main.d.ts +1457 -918
  12. package/dist/main.d.ts.map +1 -1
  13. package/dist/main.js +400 -284
  14. package/dist/main.js.map +1 -1
  15. package/dist/{mutators-Da_vMUva.d.ts → mutators-BaZDDfwh.d.ts} +2 -2
  16. package/dist/{mutators-Da_vMUva.d.ts.map → mutators-BaZDDfwh.d.ts.map} +1 -1
  17. package/dist/{mutators-CaBTxpi-.js → mutators-Dj5qBH3y.js} +2 -2
  18. package/dist/{mutators-CaBTxpi-.js.map → mutators-Dj5qBH3y.js.map} +1 -1
  19. package/dist/realtime.d.ts +430 -21
  20. package/dist/realtime.d.ts.map +1 -1
  21. package/dist/realtime.js +799 -587
  22. package/dist/realtime.js.map +1 -1
  23. package/dist/search.d.ts +247 -5
  24. package/dist/search.d.ts.map +1 -1
  25. package/dist/search.js +115 -2
  26. package/dist/search.js.map +1 -1
  27. package/dist/{transport-CIfewyM7.js → transport-Cn1V6y-o.js} +46 -8
  28. package/dist/transport-Cn1V6y-o.js.map +1 -0
  29. package/dist/{transport-BHbtsYo_.d.ts → transport-CoTymLxF.d.ts} +3 -1
  30. package/dist/transport-CoTymLxF.d.ts.map +1 -0
  31. package/openapi/activity.json +15 -1
  32. package/openapi/battlelog.json +807 -40
  33. package/openapi/main.json +5752 -4060
  34. package/openapi/search.json +721 -53
  35. package/package.json +5 -6
  36. package/dist/transport-BHbtsYo_.d.ts.map +0 -1
  37. package/dist/transport-CIfewyM7.js.map +0 -1
@@ -1,9 +1,8 @@
1
1
  import { Schema } from "effect";
2
2
  //#region ../protocol/src/realtime/protocol.d.ts
3
- export declare const REALTIME_SUBPROTOCOL = "lootlog.realtime.v1";
4
3
  export declare const REALTIME_JSON_SUBPROTOCOL = "lootlog.realtime.json.v1";
5
4
  declare const SubscriptionScope: Schema.Struct<{
6
- readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room"]>;
5
+ readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room", "global.chat", "global.chat.world"]>;
7
6
  readonly organizationId: Schema.optional<Schema.NonEmptyString>;
8
7
  readonly eventId: Schema.optional<Schema.NonEmptyString>;
9
8
  readonly world: Schema.optional<Schema.NonEmptyString>;
@@ -97,6 +96,11 @@ declare const ClientCommand: Schema.Union<readonly [Schema.Struct<{
97
96
  readonly data: Schema.Struct<{
98
97
  readonly sessionId: Schema.NonEmptyString;
99
98
  }>;
99
+ }>, Schema.Struct<{
100
+ readonly v: Schema.Literal<1>;
101
+ readonly type: Schema.Literal<"connection.ping">;
102
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
103
+ readonly data: Schema.Struct<{}>;
100
104
  }>, Schema.Struct<{
101
105
  readonly v: Schema.Literal<1>;
102
106
  readonly type: Schema.Literal<"presence.publish">;
@@ -133,13 +137,14 @@ declare const ClientCommand: Schema.Union<readonly [Schema.Struct<{
133
137
  readonly data: Schema.Struct<{
134
138
  readonly organizationId: Schema.NonEmptyString;
135
139
  readonly world: Schema.optional<Schema.NonEmptyString>;
140
+ readonly delivery: Schema.optional<Schema.Literal<"response">>;
136
141
  }>;
137
142
  }>, Schema.Struct<{
138
143
  readonly v: Schema.Literal<1>;
139
144
  readonly type: Schema.Literal<"subscription.subscribe">;
140
145
  readonly requestId: Schema.optional<Schema.NonEmptyString>;
141
146
  readonly data: Schema.Struct<{
142
- readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room"]>;
147
+ readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room", "global.chat", "global.chat.world"]>;
143
148
  readonly organizationId: Schema.optional<Schema.NonEmptyString>;
144
149
  readonly eventId: Schema.optional<Schema.NonEmptyString>;
145
150
  readonly world: Schema.optional<Schema.NonEmptyString>;
@@ -150,7 +155,7 @@ declare const ClientCommand: Schema.Union<readonly [Schema.Struct<{
150
155
  readonly type: Schema.Literal<"subscription.unsubscribe">;
151
156
  readonly requestId: Schema.optional<Schema.NonEmptyString>;
152
157
  readonly data: Schema.Struct<{
153
- readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room"]>;
158
+ readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room", "global.chat", "global.chat.world"]>;
154
159
  readonly organizationId: Schema.optional<Schema.NonEmptyString>;
155
160
  readonly eventId: Schema.optional<Schema.NonEmptyString>;
156
161
  readonly world: Schema.optional<Schema.NonEmptyString>;
@@ -161,10 +166,39 @@ declare const ClientCommand: Schema.Union<readonly [Schema.Struct<{
161
166
  readonly type: Schema.Literal<"map-ping.send">;
162
167
  readonly requestId: Schema.optional<Schema.NonEmptyString>;
163
168
  readonly data: Schema.Struct<{
164
- readonly expectedMapId: Schema.Int;
165
169
  readonly type: Schema.Literals<readonly ["attention", "enemy", "regroup", "avoid"]>;
166
170
  readonly x: Schema.Int;
167
171
  readonly y: Schema.Int;
172
+ readonly npcId: Schema.optionalKey<Schema.Int>;
173
+ readonly playerId: Schema.optionalKey<Schema.Int>;
174
+ readonly expectedMapId: Schema.Int;
175
+ }>;
176
+ }>, Schema.Struct<{
177
+ readonly v: Schema.Literal<1>;
178
+ readonly type: Schema.Literal<"battle-ping.send">;
179
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
180
+ readonly data: Schema.Struct<{
181
+ readonly expectedMapId: Schema.Int;
182
+ readonly type: Schema.Literals<readonly ["attack", "caution", "spare", "attack-speed-aura", "atmo", "cleanse", "emanating-arrow", "fury", "heal", "healing-wave", "need-heal", "poison", "protection-aura", "rime", "stigma", "taunt", "quick-fight"]>;
183
+ readonly warriorId: Schema.Int;
184
+ readonly recipientCharacterIds: Schema.$Array<Schema.String>;
185
+ }>;
186
+ }>, Schema.Struct<{
187
+ readonly v: Schema.Literal<1>;
188
+ readonly type: Schema.Literal<"loot-split.send">;
189
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
190
+ readonly data: Schema.Struct<{
191
+ readonly splitId: Schema.String;
192
+ readonly choices: Schema.$Record<Schema.String, Schema.Literals<readonly [0, 1, 2]>>;
193
+ readonly accepted: Schema.Boolean;
194
+ readonly recipientCharacterIds: Schema.$Array<Schema.String>;
195
+ }>;
196
+ }>, Schema.Struct<{
197
+ readonly v: Schema.Literal<1>;
198
+ readonly type: Schema.Literal<"loot-split.auto-accept">;
199
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
200
+ readonly data: Schema.Struct<{
201
+ readonly recipientCharacterIds: Schema.$Array<Schema.String>;
168
202
  }>;
169
203
  }>, Schema.Struct<{
170
204
  readonly v: Schema.Literal<1>;
@@ -191,11 +225,56 @@ declare const ClientCommand: Schema.Union<readonly [Schema.Struct<{
191
225
  readonly relation: Schema.Literals<readonly [1, 2, 3, 4, 5, 6, 7, 8]>;
192
226
  readonly x: Schema.Int;
193
227
  readonly y: Schema.Int;
228
+ readonly lvl: Schema.optionalKey<Schema.Int>;
229
+ readonly prof: Schema.optionalKey<Schema.NonEmptyString>;
230
+ readonly stasis: Schema.optionalKey<Schema.Boolean>;
231
+ }>>;
232
+ readonly departures: Schema.optionalKey<Schema.$Array<Schema.Struct<{
233
+ readonly targetId: Schema.NonEmptyString;
234
+ readonly reason: Schema.Literals<readonly ["left-map", "out-of-sight"]>;
235
+ }>>>;
236
+ }>;
237
+ }>, Schema.Struct<{
238
+ readonly v: Schema.Literal<1>;
239
+ readonly type: Schema.Literal<"air-tag.map-threats.fetch">;
240
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
241
+ readonly data: Schema.Struct<{
242
+ readonly organizationId: Schema.NonEmptyString;
243
+ readonly world: Schema.NonEmptyString;
244
+ }>;
245
+ }>, Schema.Struct<{
246
+ readonly v: Schema.Literal<1>;
247
+ readonly type: Schema.Literal<"npc-presence.report">;
248
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
249
+ readonly data: Schema.Struct<{
250
+ readonly world: Schema.NonEmptyString;
251
+ readonly organizationIds: Schema.$Array<Schema.NonEmptyString>;
252
+ readonly npcs: Schema.$Array<Schema.Struct<{
253
+ readonly id: Schema.Int;
254
+ readonly lvl: Schema.Int;
255
+ readonly wt: Schema.Int;
256
+ readonly prof: Schema.optionalKey<Schema.String>;
257
+ readonly type: Schema.optionalKey<Schema.Int>;
194
258
  }>>;
195
259
  }>;
260
+ }>, Schema.Struct<{
261
+ readonly v: Schema.Literal<1>;
262
+ readonly type: Schema.Literal<"npc-presence.fetch">;
263
+ readonly requestId: Schema.optional<Schema.NonEmptyString>;
264
+ readonly data: Schema.Struct<{
265
+ readonly organizationId: Schema.NonEmptyString;
266
+ readonly world: Schema.NonEmptyString;
267
+ }>;
196
268
  }>]>;
197
269
  type ClientCommand = typeof ClientCommand.Type;
198
270
  declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
271
+ readonly v: Schema.Literal<1>;
272
+ readonly type: Schema.Literal<"session.hello">;
273
+ readonly sequence: Schema.optional<Schema.Int>;
274
+ readonly data: Schema.Struct<{
275
+ readonly connectionId: Schema.NonEmptyString;
276
+ }>;
277
+ }>, Schema.Struct<{
199
278
  readonly v: Schema.Literal<1>;
200
279
  readonly type: Schema.Literal<"session.joined">;
201
280
  readonly sequence: Schema.optional<Schema.Int>;
@@ -203,7 +282,7 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
203
282
  readonly connectionId: Schema.NonEmptyString;
204
283
  readonly organizationIds: Schema.$Array<Schema.NonEmptyString>;
205
284
  readonly subscriptionScopes: Schema.$Array<Schema.Struct<{
206
- readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room"]>;
285
+ readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room", "global.chat", "global.chat.world"]>;
207
286
  readonly organizationId: Schema.optional<Schema.NonEmptyString>;
208
287
  readonly eventId: Schema.optional<Schema.NonEmptyString>;
209
288
  readonly world: Schema.optional<Schema.NonEmptyString>;
@@ -224,6 +303,7 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
224
303
  }>>;
225
304
  }>>;
226
305
  }>>;
306
+ readonly capabilities: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
227
307
  }>;
228
308
  }>, Schema.Struct<{
229
309
  readonly v: Schema.Literal<1>;
@@ -238,7 +318,7 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
238
318
  }>>>;
239
319
  readonly organizationIds: Schema.$Array<Schema.NonEmptyString>;
240
320
  readonly subscriptionScopes: Schema.$Array<Schema.Struct<{
241
- readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room"]>;
321
+ readonly topic: Schema.Literals<readonly ["organization.activity", "organization.chat", "organization.loots", "organization.members", "organization.notifications", "organization.presence", "organization.reservations", "organization.timers", "event.coordination", "map.air-tags", "map.pings", "party.ready-room", "global.chat", "global.chat.world"]>;
242
322
  readonly organizationId: Schema.optional<Schema.NonEmptyString>;
243
323
  readonly eventId: Schema.optional<Schema.NonEmptyString>;
244
324
  readonly world: Schema.optional<Schema.NonEmptyString>;
@@ -427,6 +507,52 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
427
507
  readonly organizationId: Schema.NonEmptyString;
428
508
  readonly payload: Schema.Unknown;
429
509
  }>;
510
+ }>, Schema.Struct<{
511
+ readonly v: Schema.Literal<1>;
512
+ readonly type: Schema.Literal<"global-chat.created">;
513
+ readonly sequence: Schema.optional<Schema.Int>;
514
+ readonly data: Schema.Struct<{
515
+ readonly id: Schema.NonEmptyString;
516
+ readonly displayName: Schema.NonEmptyString;
517
+ readonly message: Schema.String;
518
+ readonly timestamp: Schema.String;
519
+ readonly world: Schema.optionalKey<Schema.NonEmptyString>;
520
+ readonly originWorld: Schema.optionalKey<Schema.NonEmptyString>;
521
+ readonly isAdmin: Schema.optionalKey<Schema.Boolean>;
522
+ }>;
523
+ }>, Schema.Struct<{
524
+ readonly v: Schema.Literal<1>;
525
+ readonly type: Schema.Literal<"global-chat.deleted">;
526
+ readonly sequence: Schema.optional<Schema.Int>;
527
+ readonly data: Schema.Struct<{
528
+ readonly world: Schema.optionalKey<Schema.NonEmptyString>;
529
+ readonly id: Schema.NonEmptyString;
530
+ }>;
531
+ }>, Schema.Struct<{
532
+ readonly v: Schema.Literal<1>;
533
+ readonly type: Schema.Literal<"global-chat.pinned">;
534
+ readonly sequence: Schema.optional<Schema.Int>;
535
+ readonly data: Schema.Struct<{
536
+ readonly world: Schema.optionalKey<Schema.NonEmptyString>;
537
+ readonly message: Schema.NullOr<Schema.Struct<{
538
+ readonly id: Schema.NonEmptyString;
539
+ readonly displayName: Schema.NonEmptyString;
540
+ readonly message: Schema.String;
541
+ readonly timestamp: Schema.String;
542
+ readonly world: Schema.optionalKey<Schema.NonEmptyString>;
543
+ readonly originWorld: Schema.optionalKey<Schema.NonEmptyString>;
544
+ readonly isAdmin: Schema.optionalKey<Schema.Boolean>;
545
+ }>>;
546
+ }>;
547
+ }>, Schema.Struct<{
548
+ readonly v: Schema.Literal<1>;
549
+ readonly type: Schema.Literal<"global-chat.stats">;
550
+ readonly sequence: Schema.optional<Schema.Int>;
551
+ readonly data: Schema.Struct<{
552
+ readonly world: Schema.optionalKey<Schema.NonEmptyString>;
553
+ readonly online: Schema.Int;
554
+ readonly listeners: Schema.Int;
555
+ }>;
430
556
  }>, Schema.Struct<{
431
557
  readonly v: Schema.Literal<1>;
432
558
  readonly type: Schema.Literal<"feed.entry">;
@@ -502,7 +628,7 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
502
628
  readonly lvl: Schema.NullOr<Schema.Number>;
503
629
  readonly prof: Schema.NullOr<Schema.Literals<readonly ["WARRIOR", "PALADIN", "HUNTER", "MAGE", "BLADE_DANCER", "TRACKER"]>>;
504
630
  readonly icon: Schema.NullOr<Schema.String>;
505
- readonly type: Schema.NullOr<Schema.Literals<readonly ["COMMON", "ELITE", "ELITE2", "ELITE3", "HERO", "EVENT_HERO", "COLOSSUS", "TITAN", "NPC"]>>;
631
+ readonly type: Schema.NullOr<Schema.Literals<readonly ["COMMON", "ELITE", "ELITE2", "ELITE3", "HERO", "EVENT_HERO", "COLOSSUS", "TITAN", "HERO_TRACKER", "NPC"]>>;
506
632
  readonly margonemType: Schema.NullOr<Schema.Number>;
507
633
  }>>;
508
634
  readonly lootShare: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
@@ -602,7 +728,7 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
602
728
  readonly lvl: Schema.NullOr<Schema.Number>;
603
729
  readonly prof: Schema.NullOr<Schema.Literals<readonly ["WARRIOR", "PALADIN", "HUNTER", "MAGE", "BLADE_DANCER", "TRACKER"]>>;
604
730
  readonly icon: Schema.NullOr<Schema.String>;
605
- readonly type: Schema.NullOr<Schema.Literals<readonly ["COMMON", "ELITE", "ELITE2", "ELITE3", "HERO", "EVENT_HERO", "COLOSSUS", "TITAN", "NPC"]>>;
731
+ readonly type: Schema.NullOr<Schema.Literals<readonly ["COMMON", "ELITE", "ELITE2", "ELITE3", "HERO", "EVENT_HERO", "COLOSSUS", "TITAN", "HERO_TRACKER", "NPC"]>>;
606
732
  readonly margonemType: Schema.NullOr<Schema.Number>;
607
733
  }>>;
608
734
  readonly lootShare: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
@@ -705,7 +831,7 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
705
831
  readonly lvl: Schema.NullOr<Schema.Number>;
706
832
  readonly prof: Schema.NullOr<Schema.Literals<readonly ["WARRIOR", "PALADIN", "HUNTER", "MAGE", "BLADE_DANCER", "TRACKER"]>>;
707
833
  readonly icon: Schema.NullOr<Schema.String>;
708
- readonly type: Schema.NullOr<Schema.Literals<readonly ["COMMON", "ELITE", "ELITE2", "ELITE3", "HERO", "EVENT_HERO", "COLOSSUS", "TITAN", "NPC"]>>;
834
+ readonly type: Schema.NullOr<Schema.Literals<readonly ["COMMON", "ELITE", "ELITE2", "ELITE3", "HERO", "EVENT_HERO", "COLOSSUS", "TITAN", "HERO_TRACKER", "NPC"]>>;
709
835
  readonly margonemType: Schema.NullOr<Schema.Number>;
710
836
  }>>;
711
837
  readonly lootShare: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
@@ -733,6 +859,87 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
733
859
  }>>;
734
860
  readonly lootShare: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
735
861
  }>;
862
+ }>, Schema.Struct<{
863
+ readonly v: Schema.Literal<1>;
864
+ readonly type: Schema.Literal<"loot.snapshot">;
865
+ readonly sequence: Schema.optional<Schema.Int>;
866
+ readonly data: Schema.Struct<{
867
+ version: Schema.Literal<2>;
868
+ guildId: Schema.NonEmptyString;
869
+ lootId: Schema.Int;
870
+ npcs: Schema.$Array<Schema.Struct<{
871
+ readonly lvl: Schema.optional<Schema.NullOr<Schema.Number>>;
872
+ readonly prof: Schema.optional<Schema.NullOr<Schema.String>>;
873
+ readonly type: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.Number, Schema.String]>>>;
874
+ readonly wt: Schema.optional<Schema.NullOr<Schema.Union<readonly [Schema.Number, Schema.String]>>>;
875
+ }>>;
876
+ loot: Schema.optional<Schema.Struct<{
877
+ readonly id: Schema.Number;
878
+ readonly uniqueId: Schema.String;
879
+ readonly world: Schema.String;
880
+ readonly source: Schema.Literals<readonly ["LOOTBOX", "DIALOG", "FIGHT"]>;
881
+ readonly location: Schema.String;
882
+ readonly items: Schema.$Array<Schema.Struct<{
883
+ readonly id: Schema.Number;
884
+ readonly hid: Schema.String;
885
+ readonly name: Schema.String;
886
+ readonly icon: Schema.String;
887
+ readonly stat: Schema.String;
888
+ readonly type: Schema.NullOr<Schema.String>;
889
+ readonly rarity: Schema.NullOr<Schema.Literals<readonly ["UNIQUE", "HEROIC", "LEGENDARY", "UPGRADED"]>>;
890
+ readonly lvl: Schema.Number;
891
+ readonly prof: Schema.$Array<Schema.Literals<readonly ["WARRIOR", "PALADIN", "HUNTER", "MAGE", "BLADE_DANCER", "TRACKER"]>>;
892
+ }>>;
893
+ readonly players: Schema.$Array<Schema.Struct<{
894
+ readonly id: Schema.Union<readonly [Schema.String, Schema.Number]>;
895
+ readonly name: Schema.String;
896
+ readonly lvl: Schema.NullOr<Schema.Number>;
897
+ readonly prof: Schema.NullOr<Schema.Literals<readonly ["WARRIOR", "PALADIN", "HUNTER", "MAGE", "BLADE_DANCER", "TRACKER"]>>;
898
+ readonly icon: Schema.NullOr<Schema.String>;
899
+ readonly characterId: Schema.NullOr<Schema.Number>;
900
+ readonly accountId: Schema.NullOr<Schema.Number>;
901
+ readonly hpp: Schema.NullOr<Schema.Number>;
902
+ }>>;
903
+ readonly mapPlayersSnapshot: Schema.NullOr<Schema.$Array<Schema.Struct<{
904
+ readonly accountId: Schema.Number;
905
+ readonly characterId: Schema.Number;
906
+ readonly name: Schema.String;
907
+ readonly prof: Schema.NullOr<Schema.Literals<readonly ["WARRIOR", "PALADIN", "HUNTER", "MAGE", "BLADE_DANCER", "TRACKER"]>>;
908
+ readonly icon: Schema.NullOr<Schema.String>;
909
+ }>>>;
910
+ readonly npcs: Schema.$Array<Schema.Struct<{
911
+ readonly id: Schema.Number;
912
+ readonly name: Schema.String;
913
+ readonly wt: Schema.NullOr<Schema.Number>;
914
+ readonly lvl: Schema.NullOr<Schema.Number>;
915
+ readonly prof: Schema.NullOr<Schema.Literals<readonly ["WARRIOR", "PALADIN", "HUNTER", "MAGE", "BLADE_DANCER", "TRACKER"]>>;
916
+ readonly icon: Schema.NullOr<Schema.String>;
917
+ readonly type: Schema.NullOr<Schema.Literals<readonly ["COMMON", "ELITE", "ELITE2", "ELITE3", "HERO", "EVENT_HERO", "COLOSSUS", "TITAN", "HERO_TRACKER", "NPC"]>>;
918
+ readonly margonemType: Schema.NullOr<Schema.Number>;
919
+ }>>;
920
+ readonly lootShare: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
921
+ readonly createdAt: Schema.String;
922
+ readonly updatedAt: Schema.String;
923
+ readonly submissions: Schema.optionalKey<Schema.$Array<Schema.Struct<{
924
+ readonly guildId: Schema.String;
925
+ readonly memberId: Schema.Number;
926
+ readonly lootId: Schema.Number;
927
+ readonly member: Schema.Struct<{
928
+ readonly id: Schema.Number;
929
+ readonly name: Schema.String;
930
+ readonly avatar: Schema.NullOr<Schema.String>;
931
+ readonly userId: Schema.String;
932
+ }>;
933
+ }>>>;
934
+ readonly commentsCount: Schema.Number;
935
+ readonly likes: Schema.optionalKey<Schema.$Array<Schema.Struct<{
936
+ readonly id: Schema.Number;
937
+ readonly name: Schema.String;
938
+ readonly avatar: Schema.NullOr<Schema.String>;
939
+ readonly userId: Schema.String;
940
+ }>>>;
941
+ }>>;
942
+ }>;
736
943
  }>, Schema.Struct<{
737
944
  readonly v: Schema.Literal<1>;
738
945
  readonly type: Schema.Literal<"timer.created">;
@@ -749,6 +956,14 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
749
956
  readonly organizationId: Schema.NonEmptyString;
750
957
  readonly payload: Schema.Unknown;
751
958
  }>;
959
+ }>, Schema.Struct<{
960
+ readonly v: Schema.Literal<1>;
961
+ readonly type: Schema.Literal<"hero-sighting.updated">;
962
+ readonly sequence: Schema.optional<Schema.Int>;
963
+ readonly data: Schema.Struct<{
964
+ readonly organizationId: Schema.NonEmptyString;
965
+ readonly payload: Schema.Unknown;
966
+ }>;
752
967
  }>, Schema.Struct<{
753
968
  readonly v: Schema.Literal<1>;
754
969
  readonly type: Schema.Literal<"reservation.created">;
@@ -809,6 +1024,69 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
809
1024
  readonly organizationId: Schema.NonEmptyString;
810
1025
  readonly payload: Schema.Unknown;
811
1026
  }>;
1027
+ }>, Schema.Struct<{
1028
+ readonly v: Schema.Literal<1>;
1029
+ readonly type: Schema.Literal<"party-gathering.state-updated">;
1030
+ readonly sequence: Schema.optional<Schema.Int>;
1031
+ readonly data: Schema.Struct<{
1032
+ readonly organizationId: Schema.NonEmptyString;
1033
+ readonly payload: Schema.Union<readonly [Schema.Struct<{
1034
+ readonly type: Schema.Literal<"UPSERT">;
1035
+ readonly gathering: Schema.Struct<{
1036
+ readonly notificationId: Schema.String;
1037
+ readonly organizerName: Schema.String;
1038
+ readonly organizerDiscordId: Schema.optionalKey<Schema.String>;
1039
+ readonly organizerLvl: Schema.optionalKey<Schema.Number>;
1040
+ readonly organizerProf: Schema.optionalKey<Schema.String>;
1041
+ readonly applicantCount: Schema.Number;
1042
+ readonly inPartyCount: Schema.Number;
1043
+ readonly partyMemberCount: Schema.optionalKey<Schema.Number>;
1044
+ readonly revision: Schema.optionalKey<Schema.Number>;
1045
+ readonly volunteers: Schema.optionalKey<Schema.$Array<Schema.Struct<{
1046
+ readonly characterId: Schema.String;
1047
+ readonly nick: Schema.String;
1048
+ readonly icon: Schema.String;
1049
+ readonly lvl: Schema.Number;
1050
+ readonly prof: Schema.String;
1051
+ readonly partyPresence: Schema.Literals<readonly ["OUTSIDE", "IN_PARTY"]>;
1052
+ }>>>;
1053
+ readonly partyState: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{
1054
+ readonly status: Schema.Literal<"UNKNOWN">;
1055
+ }>, Schema.Struct<{
1056
+ readonly status: Schema.Literal<"OBSERVED">;
1057
+ readonly observedAt: Schema.String;
1058
+ readonly members: Schema.$Array<Schema.Struct<{
1059
+ readonly characterId: Schema.String;
1060
+ readonly nick: Schema.optionalKey<Schema.String>;
1061
+ readonly icon: Schema.optionalKey<Schema.String>;
1062
+ readonly lvl: Schema.optionalKey<Schema.Number>;
1063
+ readonly prof: Schema.optionalKey<Schema.String>;
1064
+ }>>;
1065
+ }>]>>;
1066
+ readonly guildIds: Schema.$Array<Schema.String>;
1067
+ readonly world: Schema.String;
1068
+ readonly description: Schema.optionalKey<Schema.String>;
1069
+ readonly minLvl: Schema.optionalKey<Schema.Number>;
1070
+ readonly maxLvl: Schema.optionalKey<Schema.Number>;
1071
+ readonly npc: Schema.optionalKey<Schema.Struct<{
1072
+ readonly prof: Schema.optionalKey<Schema.String>;
1073
+ readonly icon: Schema.optionalKey<Schema.String>;
1074
+ readonly name: Schema.String;
1075
+ readonly location: Schema.String;
1076
+ readonly lvl: Schema.Number;
1077
+ readonly x: Schema.optionalKey<Schema.Number>;
1078
+ readonly y: Schema.optionalKey<Schema.Number>;
1079
+ readonly type: Schema.optionalKey<Schema.String>;
1080
+ }>>;
1081
+ readonly createdAt: Schema.String;
1082
+ readonly expiresAt: Schema.String;
1083
+ }>;
1084
+ }>, Schema.Struct<{
1085
+ readonly type: Schema.Literal<"REMOVE">;
1086
+ readonly notificationId: Schema.String;
1087
+ readonly revision: Schema.Number;
1088
+ }>]>;
1089
+ }>;
812
1090
  }>, Schema.Struct<{
813
1091
  readonly v: Schema.Literal<1>;
814
1092
  readonly type: Schema.Literal<"party-ready-room.updated">;
@@ -822,18 +1100,63 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
822
1100
  readonly type: Schema.Literal<"map-ping.received">;
823
1101
  readonly sequence: Schema.optional<Schema.Int>;
824
1102
  readonly data: Schema.Struct<{
825
- readonly pingId: Schema.NonEmptyString;
826
- readonly world: Schema.NonEmptyString;
827
- readonly mapId: Schema.Int;
828
1103
  readonly type: Schema.Literals<readonly ["attention", "enemy", "regroup", "avoid"]>;
829
1104
  readonly x: Schema.Int;
830
1105
  readonly y: Schema.Int;
1106
+ readonly npcId: Schema.optionalKey<Schema.Int>;
1107
+ readonly playerId: Schema.optionalKey<Schema.Int>;
1108
+ readonly pingId: Schema.NonEmptyString;
1109
+ readonly world: Schema.NonEmptyString;
1110
+ readonly mapId: Schema.Int;
1111
+ readonly sender: Schema.Struct<{
1112
+ readonly characterId: Schema.NonEmptyString;
1113
+ readonly name: Schema.NonEmptyString;
1114
+ }>;
1115
+ readonly createdAt: Schema.Int;
1116
+ }>;
1117
+ }>, Schema.Struct<{
1118
+ readonly v: Schema.Literal<1>;
1119
+ readonly type: Schema.Literal<"battle-ping.received">;
1120
+ readonly sequence: Schema.optional<Schema.Int>;
1121
+ readonly data: Schema.Struct<{
1122
+ readonly pingId: Schema.NonEmptyString;
1123
+ readonly world: Schema.NonEmptyString;
1124
+ readonly mapId: Schema.Int;
1125
+ readonly type: Schema.Literals<readonly ["attack", "caution", "spare", "attack-speed-aura", "atmo", "cleanse", "emanating-arrow", "fury", "heal", "healing-wave", "need-heal", "poison", "protection-aura", "rime", "stigma", "taunt", "quick-fight"]>;
1126
+ readonly warriorId: Schema.Int;
831
1127
  readonly sender: Schema.Struct<{
832
1128
  readonly characterId: Schema.NonEmptyString;
833
1129
  readonly name: Schema.NonEmptyString;
834
1130
  }>;
835
1131
  readonly createdAt: Schema.Int;
836
1132
  }>;
1133
+ }>, Schema.Struct<{
1134
+ readonly v: Schema.Literal<1>;
1135
+ readonly type: Schema.Literal<"loot-split.received">;
1136
+ readonly sequence: Schema.optional<Schema.Int>;
1137
+ readonly data: Schema.Struct<{
1138
+ readonly splitId: Schema.String;
1139
+ readonly world: Schema.NonEmptyString;
1140
+ readonly sender: Schema.Struct<{
1141
+ readonly characterId: Schema.NonEmptyString;
1142
+ readonly name: Schema.NonEmptyString;
1143
+ }>;
1144
+ readonly choices: Schema.$Record<Schema.String, Schema.Literals<readonly [0, 1, 2]>>;
1145
+ readonly accepted: Schema.Boolean;
1146
+ readonly sentAt: Schema.Int;
1147
+ }>;
1148
+ }>, Schema.Struct<{
1149
+ readonly v: Schema.Literal<1>;
1150
+ readonly type: Schema.Literal<"loot-split.auto-accepted">;
1151
+ readonly sequence: Schema.optional<Schema.Int>;
1152
+ readonly data: Schema.Struct<{
1153
+ readonly world: Schema.NonEmptyString;
1154
+ readonly sender: Schema.Struct<{
1155
+ readonly characterId: Schema.NonEmptyString;
1156
+ readonly name: Schema.NonEmptyString;
1157
+ }>;
1158
+ readonly sentAt: Schema.Int;
1159
+ }>;
837
1160
  }>, Schema.Struct<{
838
1161
  readonly v: Schema.Literal<1>;
839
1162
  readonly type: Schema.Literal<"air-tag.updated">;
@@ -855,11 +1178,85 @@ declare const ServerEvent: Schema.Union<readonly [Schema.Struct<{
855
1178
  readonly relation: Schema.Literals<readonly [1, 2, 3, 4, 5, 6, 7, 8]>;
856
1179
  readonly x: Schema.Int;
857
1180
  readonly y: Schema.Int;
1181
+ readonly lvl: Schema.optionalKey<Schema.Int>;
1182
+ readonly prof: Schema.optionalKey<Schema.NonEmptyString>;
1183
+ readonly stasis: Schema.optionalKey<Schema.Boolean>;
858
1184
  readonly observedAt: Schema.Int;
859
1185
  readonly enemyObservedAt: Schema.optionalKey<Schema.Int>;
860
1186
  readonly clanEnemyObservedAt: Schema.optionalKey<Schema.Int>;
861
1187
  }>;
862
1188
  }>;
1189
+ }>, Schema.Struct<{
1190
+ readonly v: Schema.Literal<1>;
1191
+ readonly type: Schema.Literal<"air-tag.scope-updated">;
1192
+ readonly sequence: Schema.optional<Schema.Int>;
1193
+ readonly data: Schema.Struct<{
1194
+ readonly guildId: Schema.NonEmptyString;
1195
+ readonly world: Schema.NonEmptyString;
1196
+ readonly mapId: Schema.Int;
1197
+ readonly epochId: Schema.NonEmptyString;
1198
+ readonly epochStartedAt: Schema.Int;
1199
+ readonly revision: Schema.Int;
1200
+ readonly targets: Schema.$Array<Schema.Struct<{
1201
+ readonly targetId: Schema.NonEmptyString;
1202
+ readonly nickname: Schema.NonEmptyString;
1203
+ readonly clan: Schema.optionalKey<Schema.Struct<{
1204
+ readonly id: Schema.Int;
1205
+ readonly name: Schema.NonEmptyString;
1206
+ }>>;
1207
+ readonly relation: Schema.Literals<readonly [1, 2, 3, 4, 5, 6, 7, 8]>;
1208
+ readonly x: Schema.Int;
1209
+ readonly y: Schema.Int;
1210
+ readonly lvl: Schema.optionalKey<Schema.Int>;
1211
+ readonly prof: Schema.optionalKey<Schema.NonEmptyString>;
1212
+ readonly stasis: Schema.optionalKey<Schema.Boolean>;
1213
+ readonly observedAt: Schema.Int;
1214
+ readonly enemyObservedAt: Schema.optionalKey<Schema.Int>;
1215
+ readonly clanEnemyObservedAt: Schema.optionalKey<Schema.Int>;
1216
+ }>>;
1217
+ readonly removedTargetIds: Schema.$Array<Schema.NonEmptyString>;
1218
+ }>;
1219
+ }>, Schema.Struct<{
1220
+ readonly v: Schema.Literal<1>;
1221
+ readonly type: Schema.Literal<"air-tag.map-threat-updated">;
1222
+ readonly sequence: Schema.optional<Schema.Int>;
1223
+ readonly data: Schema.Struct<{
1224
+ readonly guildId: Schema.NonEmptyString;
1225
+ readonly world: Schema.NonEmptyString;
1226
+ readonly mapId: Schema.Int;
1227
+ readonly mapName: Schema.NonEmptyString;
1228
+ readonly revision: Schema.Int;
1229
+ readonly enemies: Schema.$Array<Schema.Struct<{
1230
+ readonly targetId: Schema.NonEmptyString;
1231
+ readonly nickname: Schema.NonEmptyString;
1232
+ readonly clan: Schema.optionalKey<Schema.Struct<{
1233
+ readonly id: Schema.Int;
1234
+ readonly name: Schema.NonEmptyString;
1235
+ }>>;
1236
+ readonly lvl: Schema.optionalKey<Schema.Int>;
1237
+ readonly prof: Schema.optionalKey<Schema.NonEmptyString>;
1238
+ readonly stasis: Schema.optionalKey<Schema.Boolean>;
1239
+ readonly ageMs: Schema.Int;
1240
+ }>>;
1241
+ }>;
1242
+ }>, Schema.Struct<{
1243
+ readonly v: Schema.Literal<1>;
1244
+ readonly type: Schema.Literal<"npc-presence.updated">;
1245
+ readonly sequence: Schema.optional<Schema.Int>;
1246
+ readonly data: Schema.Struct<{
1247
+ readonly organizationId: Schema.NonEmptyString;
1248
+ readonly world: Schema.NonEmptyString;
1249
+ readonly revision: Schema.Int;
1250
+ readonly npc: Schema.Struct<{
1251
+ readonly id: Schema.Int;
1252
+ readonly lvl: Schema.Int;
1253
+ readonly wt: Schema.Int;
1254
+ readonly prof: Schema.optionalKey<Schema.String>;
1255
+ readonly type: Schema.optionalKey<Schema.Int>;
1256
+ }>;
1257
+ readonly standing: Schema.Boolean;
1258
+ readonly since: Schema.Int;
1259
+ }>;
863
1260
  }>, Schema.Struct<{
864
1261
  readonly v: Schema.Literal<1>;
865
1262
  readonly type: Schema.Literal<"event.map-status-updated">;
@@ -921,20 +1318,20 @@ type CommandData<Type extends CommandType> = Extract<ClientCommand, {
921
1318
  }>["data"];
922
1319
  type RealtimeConnectionState = "disconnected" | "connecting" | "connected" | "joining" | "ready" | "reconnecting";
923
1320
  interface RealtimeWebSocket {
924
- binaryType: BinaryType;
925
1321
  readonly readyState: number;
926
1322
  addEventListener(type: "open" | "close" | "error" | "message", listener: (event: {
927
1323
  readonly data?: unknown;
1324
+ readonly code?: number;
928
1325
  }) => void): void;
929
- send(data: string | Uint8Array<ArrayBuffer>): void;
1326
+ send(data: string): void;
930
1327
  close(code?: number, reason?: string): void;
931
1328
  }
932
1329
  type RealtimeWebSocketFactory = (url: string, protocols?: string[]) => RealtimeWebSocket;
933
1330
  interface RealtimeClientOptions {
934
1331
  readonly url: string;
935
1332
  readonly path?: string;
1333
+ /** Capability subprotocols to offer next to `REALTIME_JSON_SUBPROTOCOL`. */
936
1334
  readonly protocols?: ReadonlyArray<string>;
937
- readonly frameEncoding?: "json" | "messagepack";
938
1335
  readonly requestTimeoutMs?: number;
939
1336
  readonly reconnectBaseDelayMs?: number;
940
1337
  readonly reconnectMaxDelayMs?: number;
@@ -949,26 +1346,31 @@ export declare class RealtimeRequestError extends Error {
949
1346
  }
950
1347
  export declare class RealtimeClient {
951
1348
  private readonly url;
952
- private readonly protocols?;
1349
+ private readonly protocols;
953
1350
  private readonly requestTimeoutMs;
954
1351
  private readonly reconnectBaseDelayMs;
955
1352
  private readonly reconnectMaxDelayMs;
956
1353
  private readonly random;
957
1354
  private readonly webSocketFactory;
958
- private readonly frameEncoding;
959
1355
  private readonly eventListeners;
960
1356
  private readonly stateListeners;
1357
+ private heartbeatLatencyMs;
1358
+ private readonly heartbeatLatencyListeners;
961
1359
  private readonly pending;
962
1360
  private readonly subscriptions;
963
1361
  private socket;
964
1362
  private stateValue;
965
1363
  private joinData;
1364
+ private joinAttempt;
966
1365
  private reconnectAttempt;
1366
+ private reconnectNotBeforeMs;
967
1367
  private reconnectTimeout;
968
1368
  private heartbeatTimeout;
969
1369
  private presenceSessionId;
1370
+ private presenceRefreshedAt;
1371
+ private pingSupported;
1372
+ private latencyProbeInFlight;
970
1373
  private manuallyClosed;
971
- private messageChain;
972
1374
  private rejoinHandler;
973
1375
  constructor(options: RealtimeClientOptions);
974
1376
  get state(): RealtimeConnectionState;
@@ -977,17 +1379,24 @@ export declare class RealtimeClient {
977
1379
  disconnect(): void;
978
1380
  subscribe(listener: (event: ServerEvent) => void): () => void;
979
1381
  subscribeState(listener: (state: RealtimeConnectionState) => void): () => void;
1382
+ subscribeHeartbeatLatency(listener: (latencyMs: number | null) => void): () => void;
1383
+ /**
1384
+ * Measures the round trip now instead of at the next heartbeat. A gateway
1385
+ * that does not advertise `connection.ping` keeps the heartbeat measurement.
1386
+ */
1387
+ probeLatency(): void;
1388
+ private setHeartbeatLatency;
980
1389
  setReconnectHandler(handler: (() => Promise<void>) | null): void;
981
1390
  join(data: CommandData<"session.join">): Promise<unknown>;
982
1391
  subscribeScope(scope: SubscriptionScope): Promise<unknown>;
983
1392
  unsubscribeScope(scope: SubscriptionScope): Promise<unknown>;
984
1393
  request<Type extends CommandType>(type: Type, data: CommandData<Type>): Promise<unknown>;
1394
+ private requestWithTimeout;
985
1395
  send<Type extends CommandType>(type: Type, data: CommandData<Type>): void;
986
1396
  private open;
987
1397
  private performJoin;
1398
+ private restoreSession;
988
1399
  private handleMessage;
989
- private encodeFrame;
990
- private decodeFrame;
991
1400
  private scheduleReconnect;
992
1401
  private scheduleHeartbeat;
993
1402
  private rejectPending;