-
-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathtypes.ts
More file actions
1648 lines (1556 loc) · 40.8 KB
/
Copy pathtypes.ts
File metadata and controls
1648 lines (1556 loc) · 40.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* The Peacock Project - a HITMAN server replacement.
* Copyright (C) 2021-2026 The Peacock Project Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import type * as core from "express-serve-static-core"
import type { ContractCreationNpcTargetPayload } from "../statemachines/contractCreation"
import { Request } from "express"
import {
ChallengeContext,
ProfileChallengeData,
SavedChallenge,
} from "./challenges"
import { SessionGhostModeDetails } from "../multiplayer/multiplayerService"
import { IContextListener } from "../statemachines/contextListeners"
import { ManifestScoringModule, ScoringModule } from "./scoring"
import { Timer } from "@peacockproject/statemachine-parser"
import { InventoryItem } from "../inventory"
/**
* A duration or relative point in time expressed in seconds.
*/
export type Seconds = number
/**
* The game's major version.
*/
export type GameVersion = "h1" | "h2" | "h3" | "scpc"
/**
* The server configuration's target audience.
*
* Notes:
* - pc-prod8 is deprecated, as HITMAN 3 after 3.100.0 no longer uses it.
*/
export type GameAudience =
| "pc-prod8"
| "pc-prod7"
| "pc-prod6"
| "steam-prod_8"
| "epic-prod_8"
| "xboxone-prod"
| "scpc-prod"
| "playtest01-prod_8"
/**
* Data from the JSON Web Token (JWT) authentication scheme.
*/
export interface JwtData {
/**
* Usually bearer.
*/
"auth:method": "bearer" | string
/**
* Always "user".
*/
roles: "user"
sub: string
/**
* Profile ID.
*/
unique_name: string
/**
* User ID.
*/
userid: string
/**
* Either "steam" or "epic" on PC.
*/
platform: "steam" | "epic"
/**
* Client/account locale.
*/
locale: string
/**
* Client/account region.
*/
rgn: string
/**
* External appid.
*/
pis: string
/**
* Country, specified by the locale property.
*/
cntry: string
/**
* Expires in.
*/
exp: string
/**
* Not before.
*/
nbf: string
/**
* Issuer (from external provider).
*/
iss: string
/**
* The audience.
*
* @see GameAudience
*/
aud: GameAudience
}
/**
* A request with a JSON web token (JWT) already parsed. Also contains our custom request properties.
*/
export interface RequestWithJwt<
Query = core.Query,
// TODO: Make this `unknown` instead, requires lots of changes elsewhere
// eslint-disable-next-line @typescript-eslint/no-explicit-any
RequestBody = any,
Params = core.ParamsDictionary,
> extends Request<
Params,
// eslint-disable-next-line
any,
RequestBody,
core.Query & Query
> {
/**
* The user's JSON Web Token (JWT) data.
*/
jwt: JwtData
/**
* The current Hitman server version.
*/
serverVersion?: string
/**
* The game's version.
*/
gameVersion: GameVersion
/**
* Used internally to declare if a route should be propagated to its handler or cancelled early.
*/
shouldCease?: boolean
}
/**
* The status of cameras in a mission.
*/
export enum PeacockCameraStatus {
NotSpotted = "NOT_SPOTTED",
Spotted = "SPOTTED",
Erased = "ERASED",
}
/**
* The status of security cameras in a mission (event-end).
*/
export type SecurityCameraStatus = "destroyed" | "spotted" | "erased"
/**
* A repository ID (really just a UUID v4).
*/
export type RepositoryId = string
/**
* Possible mission `Metadata.Type` values.
*/
export type MissionType =
| "mission"
| "elusive"
| "escalation"
| "featured"
| "sniper"
| "usercreated"
| "creation"
| "tutorial"
| "orbis"
| "campaign"
| "arcade"
| "vsrace"
| "evergreen"
| "flashback"
/**
* The data acquired when using the "contract search" functionality.
*/
export type ContractSearchResult = {
Data: {
Contracts: {
UserCentricContract: UserCentricContract
}[]
ErrorReason: string
HasMore: boolean
HasPrevious: boolean
Page: number
TotalCount: number
}
}
/**
* The last kill in a contract session.
*
* @see ContractSession
*/
export type ContractSessionLastKill = {
timestamp?: Date | number
repositoryIds?: RepositoryId[]
/**
* If the last kill was unnoticed in H2016.
* See [this video](https://www.youtube.com/watch?v=4fMDqRZg3Ik) for an explanation on how it's supposed to work.
*/
legacyIsUnnoticed?: boolean
}
/**
* A contract session is created every time you start a level, which contains the data of the play session.
* Primarily used for scoring, saving, and loading.
*/
export interface ContractSession {
Id: string
gameVersion: GameVersion
sessionStart: Date | number
lastUpdate: Date | number
contractId: string
userId: string
timerStart: Date | number
timerEnd: Date | number
duration: Date | number
crowdNpcKills: number
targetKills: Set<RepositoryId>
npcKills: Set<RepositoryId>
bodiesHidden: Set<RepositoryId>
pacifications: Set<RepositoryId>
disguisesUsed: Set<RepositoryId>
disguisesRuined: Set<RepositoryId>
spottedBy: Set<RepositoryId>
witnesses: Set<RepositoryId>
bodiesFoundBy: Set<RepositoryId>
legacyHasBodyBeenFound: boolean
killsNoticedBy: Set<RepositoryId>
completedObjectives: Set<RepositoryId>
failedObjectives: Set<RepositoryId>
recording: PeacockCameraStatus
lastAccident: number
lastKill: ContractSessionLastKill
kills: Set<RatingKill>
markedTargets: Set<RepositoryId>
compat: boolean
currentDisguise: string
difficulty: number
objectives: Map<string, MissionManifestObjective>
objectiveStates: Map<string, string>
objectiveContexts: Map<string, unknown>
/**
* Session Ghost Mode details.
*
* @since v5.0.0
*/
ghost?: SessionGhostModeDetails
/**
* The current state of the challenges.
*
* @since v5.6.0-dev.1
*/
challengeContexts?: {
[challengeId: string]: ChallengeContext
}
/**
* Session Evergreen details.
*
* @since v6.0.0
*/
evergreen?: {
payout: number
scoringScreenEndState: string | null
failed: boolean
}
/**
* Scoring settings, and statemachine settings.
* Currently only used for Sniper Challenge missions.
*
* Settings: Keyed by the type property in modules.
* Context: The current context of the scoring statemachine.
* Definition: The initial definition of the scoring statemachine.
* State: The current state of the scoring statemachine.
* Timers: The current timers of the scoring statemachine.
*
* @since v7.0.0
*/
scoring?: {
Settings: {
[name: string]: ScoringModule
}
Context: unknown
Definition: unknown
State: string
Timers: Timer[]
}
/**
* Timestamp of first kill.
* Used for calculating Sniper Challenge time bonus.
* @since v7.0.0
*/
firstKillTimestamp?: number
/**
* If true, it is not possible anymore to get an SA rating.
* @since v8.0.0
*/
silentAssassinLost?: boolean
}
/**
* The SaveFile object passed by the client in /ProfileService/UpdateUserSaveFileTable
*/
export interface SaveFile {
// The contract session ID of the save
ContractSessionId: string
// The unix timestamp at the time of saving
TimeStamp: number
Value: {
// The name of the save slot
Name: string
// The token of the last event that happened before the save was made
LastEventToken: string
}
}
/**
* The body sent with the UpdateUserSaveFileTable request from the game after saving.
*
* @see SaveFile
*/
export type UpdateUserSaveFileTableBody = {
clientSaveFileList: SaveFile[]
deletedSaveFileList: SaveFile[]
}
/**
* The Hitman server version in object form.
*/
export type ServerVersion = Readonly<{
_Major: number
_Minor: number
_Build: number
_Revision: number
}>
/**
* An event sent from the game client to the server.
*/
export interface ClientToServerEvent<EventValue = unknown> {
Value: EventValue extends object ? Readonly<EventValue> : EventValue
ContractSessionId: string
ContractId: string
Name: string
Timestamp: number
}
/**
* A wrapper for {@link ServerToClientEvent} that also has a timestamp value.
*
* @see ServerToClientEvent
*/
export interface S2CEventWithTimestamp<EventValue = unknown> {
time: number | string
event: ServerToClientEvent<EventValue>
}
/**
* A server to client push message. The message component is encoded JSON.
*/
export type PushMessage = {
time: number | string | bigint
message: string
}
/**
* A server to client event.
*/
export interface ServerToClientEvent<EventValue = unknown> {
message?: string
CreatedAt?: string
Token?: string
IsReplicated?: boolean
Version: ServerVersion
CreatedContract?: string | null
Id?: string
Name?: string
UserId?: string
ContractId?: string
SessionId?: string | null
ContractSessionId?: string
Timestamp?: number
Value?: EventValue
Origin?: string | null
}
export type MissionStory = {
CommonRepositoryId: RepositoryId
PreviouslyCompleted: boolean
IsMainOpportunity: boolean
Title: string
Summary: string
Briefing: string
Location: string
SubLocation: string
Image: string
}
export type PlayerProfileLocation = {
LocationId: string
Xp: number
ActionXp: number
LocationProgression?: {
Level: number
MaxLevel: number
}
}
export type PlayerProfileView = {
SubLocationData: {
ParentLocation: Unlockable
Location: Unlockable
CompletionData: CompletionData
ChallengeCategoryCompletion: ChallengeCategoryCompletion[]
ChallengeCompletion: ChallengeCompletion
OpportunityStatistics: OpportunityStatistics
LocationCompletionPercent: number
}[]
PlayerProfileXp: {
Total: number
Level: number
Sublocations?: PlayerProfileLocation[]
Seasons: {
Number: number
Locations: PlayerProfileLocation[]
}[]
}
}
export type ChallengeCompletion = {
ChallengesCount: number
CompletedChallengesCount: number
CompletionPercent?: number
}
export type ChallengeCategoryCompletion = ChallengeCompletion & {
Name: string
}
export type OpportunityStatistics = {
Count: number
Completed: number
}
export type ContractHistory = {
LastPlayedAt?: number
Completed?: boolean
IsEscalation?: boolean
}
export type ProgressionData = {
Xp: number
Level: number
PreviouslySeenXp: number
}
export type UserProfile = {
Id: string
LinkedAccounts: {
dev?: string
epic?: string
steam?: string
gog?: string
xbox?: string
/** @deprecated */
stadia?: string
apple?: string
nintendo?: string
}
Extensions: {
/**
* Map of escalation group ID to current level number.
*/
PeacockEscalations: {
[escalationId: string]: number
}
PeacockFavoriteContracts: string[]
PeacockPlayedContracts: {
[contractId: string]: ContractHistory
}
PeacockCompletedEscalations: string[]
Saves: {
[slot: string]: {
Timestamp: number
ContractSessionId: string
Token: string
}
}
ChallengeProgression: {
[id: string]: ProfileChallengeData
}
/**
* Player progression data.
*/
progression: {
/**
* Player XP and level data.
*/
PlayerProfileXP: {
ProfileLevel: number
/**
* The total amount of XP a user has obtained.
*/
Total: number
Sublocations: {
[location: string]: {
Xp: number
ActionXp: number
}
}
}
/**
* If the mastery location has subpackages and not drops, it will
* be an object.
*/
Locations: {
[location: string]:
| ProgressionData
| {
[subPackageId: string]: ProgressionData
}
}
}
defaultloadout?: {
[location: string]: GameLoadout & {
[briefcaseId: string]: string
}
}
entP: string[]
achievements?: unknown
gamepersistentdata: {
__stats?: unknown
PersistentBool: Record<string, unknown>
HitsFilterType: {
// "all" / "completed" / "failed"
MyHistory: string
MyContracts: string
MyPlaylist: string
}
menudata: {
difficulty: {
destinations: {
[locationId: string]: "normal" | "pro1"
}
}
newunlockables: string[]
}
}
opportunityprogression: {
[opportunityId: RepositoryId]: boolean
}
CPD: CPDStore
LastOfficialSync: Date | string | null
}
ETag: string | null
Gamertag: string
DevId: string | null
SteamId: string | null
EpicId: string | null
AppleId?: string | null
NintendoId: string | null
XboxLiveId: string | null
PSNAccountId: string | null
PSNOnlineId: string | null
/**
* @since v7.0.0 user profiles are now versioned.
*/
Version: number
}
export type RatingKill = {
IsHeadshot: boolean
KillClass: string
KillItemCategory: string
KillMethodBroad: string
KillMethodStrict: string
KillItemRepositoryId: RepositoryId
// only used in contract creation?
RequiredKillMethodType?: number
// TODO: why did we do this??
_RepositoryId?: RepositoryId
// !!! use the one above this one - this is only a placeholder and will not actually work
RepositoryId?: RepositoryId
OutfitRepoId: string
}
export type NamespaceEntitlementEpic = {
namespace: string
itemId: string
owned: boolean
}
/**
* An unlockable item.
*/
export type Unlockable = {
Id: string
DisplayNameLocKey: string
GameAsset: string | null
Guid: string
Type: string
Subtype?: string
// TODO: is this used?
SubType?: string
ImageId?: string | null
RMTPrice?: number
GamePrice?: number
IsPurchasable: boolean
IsPublished: boolean
IsDroppable: boolean
Capabilities: unknown[]
Qualities?: Record<string, unknown> | null
Properties: {
RewardHidden?: boolean
HowToUnlock?: string
AllowUpSync?: boolean
Background?: string
Icon?: string
LockedIcon?: string
DlcImage?: string
DlcName?: string
IsLocked?: boolean
IsHidden?: boolean
Order?: number
ProgressionKey?: string
Season?: number
RequiredResources?: string[]
Entitlements?: string[]
ParentLocation?: string
GameChangers?: unknown[]
CreateContractId?: null | string
IsFreeDLC?: boolean
HideProgression?: boolean
ExcludeParentRewards?: boolean
Quality?: number | string
UpcomingContent?: boolean
UpcomingKey?: "UI_MENU_LIVETILE_CONTENT_UPCOMING_HEADLINE" | string
LimitedLoadout?: boolean
NormalLoadoutUnlock?:
| {
normal: string
pro1: string
}
| string
Unlocks?: string[]
Rarity?: string | null
// noinspection SpellCheckingInspection
LoadoutSlot?:
| "carriedweapon"
| "concealedweapon"
| "disguise"
| "gear"
| string
ItemSize?: string
IsConsumable?: boolean
RepositoryId?: RepositoryId
OrderIndex?: number
Name?: string
Description?: string
UnlockOrder?: number
UnlockLevel?: string
Location?: string
Equip?: string[]
GameAssets?: string[]
RepositoryAssets?: RepositoryId[]
Gameplay?: ItemGameplay
AlwaysAdd?: boolean
BlacklistedByDefault?: boolean
IsContainer?: boolean
LoadoutSettings?: {
GearSlotsEnabledCount?: number
GearSlotsAllowContainers?: boolean
ConcealedWeaponSlotEnabled?: boolean
}
UnlockedByDefault?: boolean
DifficultyUnlock?: {
pro1?: string
}
Difficulty?: string
/**
* Sniper rifle modifier repository IDs.
*/
Modifiers?: RepositoryId[] | null
// noinspection SpellCheckingInspection
/**
* Inclusion data for an unlockable. The only known use for this is
* sniper rifle unlockables for Sniper Assassin mode.
*/
InclusionData?: InclusionData
/**
* Item perks - only known use is for Sniper Assassin.
*/
Perks?: string[] | null
}
Rarity?: string | null
}
export type ItemGameplay = {
range?: number
damage?: number
clipsize?: number
rateoffire?: number
}
export type CompletionData = {
Level: number
MaxLevel: number
XP: number
PreviouslySeenXp: number
Completion: number
XpLeft: number
Id: string
SubLocationId: string
HideProgression: boolean
IsLocationProgression: boolean
Name: string | null
}
export type UserCentricContract = {
Contract: MissionManifest
Data: {
IsLocked: boolean
LockedReason: string
LocationLevel: number
LocationMaxLevel: number
LocationCompletion: number
LocationXpLeft: number
LocationHideProgression: boolean
ElusiveContractState: string
LastPlayedAt?: string
IsFeatured?: boolean
// For favorite contracts
PlaylistData?: {
IsAdded: boolean
// Not sure if this is important
AddedTime: string
}
Completed?: boolean
LocationId: string
ParentLocationId: string
CompletionData?: CompletionData
DlcName: string
DlcImage: string
EscalationCompleted?: boolean
EscalationCompletedLevels?: number
EscalationTotalLevels?: number
InGroup?: string
}
}
export type TargetCondition = {
/**
* The target condition type. This can be one of the following:
* - `killmethod` - A way to kill the target.
* - `hitmansuit` - Specifies the outfit must be any suit that you can start a level with which (but not a disguise).
* - `disguise` - Specifies the outfit must be a specific disguise.
*/
Type: "killmethod" | "hitmansuit" | "disguise"
RepositoryId?: RepositoryId
/**
* If the game should display the objective as optional or not.
*/
HardCondition?: boolean
/**
* The objective ID that this condition is tied to. When specified, the game can mark the condition with a check mark or X in the F1 menu.
*/
ObjectiveId?: string
/**
* For outfit requirements, this is just an empty string. For kill methods, this is the kill method.
*/
KillMethod: "" | string
}
/**
* Data structure for an objective's HUD template.
*/
export interface HUDTemplate {
display:
| string
| {
$loc: {
key: string
data: string
}
}
iconType?: number
}
/**
* Data structure for a mission manifest's `Data.VR` bricks property.
*/
export type VRQualityDefinition = {
Quality: string
Bricks: string[]
}
export interface MissionManifestObjective {
_comment?: string
Id: string
Type?: "kill" | "statemachine" | string
Scope?: string
Primary?: boolean
IsHidden?: boolean
BriefingText?: string | { $loc: { key: string; data: string | number[] } }
LongBriefingText?:
| string
| { $loc: { key: string; data: string | number[] } }
Image?: string
BriefingName?: string
ShowInHud?: boolean
CombinedDisplayInHud?: boolean
DisplayAsKillObjective?: boolean
Category?: "primary" | "secondary" | "condition" | string
ForceShowOnLoadingScreen?: boolean
/**
* Allow Elusive Target Arcade contracts to be restarted if this objective is already successfully completed.
*/
AllowEtRestartOnSuccess?: boolean
OnInactive?: {
IfCompleted?: {
State?: string
}
}
Definition?: {
display?: {
iconType?: number
}
ContextListeners?: null | Record<string, IContextListener<never>>
Scope?: string
States?: Record<string, unknown>
Constants?: Record<string, unknown>
Context?: Record<string, unknown | string[] | string>
}
Activation?: {
$eq?: (string | boolean)[]
}
OnActive?: {
IfInProgress?: {
Visible?: boolean
State?: "Completed" | "InProgress" | "Failed" | string
}
IfCompleted?: {
Visible?: boolean
State?: "Completed" | "InProgress" | "Failed" | string
}
IfFailed?: {
Visible?: boolean
State?: "Completed" | "InProgress" | "Failed" | string
}
}
ObjectiveType?: "kill" | "customkill" | "setpiece" | "custom" | string
TargetConditions?: TargetCondition[]
ExcludeFromScoring?: boolean
HUDTemplate?: HUDTemplate
SuccessEvent?: {
EventName: "Kill" | string
EventValues: {
RepositoryId: RepositoryId
}
}
FailedEvent?: {
EventName: string
EventValues?: {
RepositoryId?: RepositoryId
}
}
ResetEvent?: null
IgnoreIfInactive?: boolean
GameChangerName?: string
IsPrestigeObjective?: boolean
}
/**
* Data for a group contract.
*/
export type ContractGroupDefinition = {
/**
* The contract group type.
*/
Type: MissionType
/**
* The contracts in this group, ordered by their position in the group.
*/
Order: string[]
}
export type EscalationInfo = {
Type?: MissionType
InGroup?: string
NextContractId?: string
GroupData?: {
Level: number
TotalLevels: number
Completed: boolean
FirstContractId: string
}
}
export interface MissionManifestMetadata {
Id: string
Location: string
IsPublished?: boolean | null
CreationTimestamp?: string | null
CreatorUserId?: string | null
Title: string
Description?: string | null
BriefingVideo?:
| string
| {
Mode: string
VideoId: string
}[]
DebriefingVideo?: string | null
TileImage?:
| string
| {
Mode: string
Image: string
}[]
CodeName_Hint?: string | null
ScenePath: string
Type: MissionType
Release?: string | object | null
RequiredUnlockable?: string | null
Drops?: string[] | null
Opportunities?: string[] | null
OpportunityData?: MissionStory[] | null
Entitlements: string[] | null
LastUpdate?: string | null
PublicId?: string | null
GroupObjectiveDisplayOrder?: GroupObjectiveDisplayOrderItem[] | null
GameVersion?: string | null
ServerVersion?: string | null
NonTargetKillsAllowed?: boolean | null
Difficulty?: "pro1" | string | null
OnlyNeoVR?: boolean | null
LocationSuitOverride?: string
CharacterSetup?:
| {
Mode: "singleplayer" | "multiplayer" | string
Characters: {
Name: string
Id: string
MandatoryLoadout?: string[]
}[]
}[]
| null
CharacterLoadoutData?:
| {
Id: string
Loadout: unknown
CompletionData: CompletionData
}[]
| null
SpawnSelectionType?: "random" | string | null
Gamemodes?: ("versus" | string)[] | null
Enginemodes?: ("singleplayer" | "multiplayer" | string)[] | null
EndConditions?: {
PointLimit?: number
} | null
Subtype?: string | null
GroupTitle?: string | null
TargetExpiration?: number | null
TargetExpirationReduced?: number | null
TargetLifeTime?: number | null
NonTargetKillPenaltyEnabled?: boolean | null
NoticedTargetStreakPenaltyMax?: number | null
IsFeatured?: boolean | null
// Begin escalation-exclusive properties
InGroup?: string | null
NextContractId?: string | null
GroupDefinition?: ContractGroupDefinition | null
GroupData?: EscalationInfo["GroupData"] | null
// End escalation-exclusive properties
/**
* Useless property.
*
* @deprecated
*/
readonly UserData?: unknown | null