-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.ts
6770 lines (6215 loc) · 273 KB
/
client.ts
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
// deno-lint-ignore-file
import { dispatchRequest, RequestOptions } from "./support/runtime.ts";
export interface AcceptTradeRequest {
/** Items from the accepting player's inventory in exchange for the offered items in the trade. In the case of a gift, this will be null. */
AcceptedInventoryInstanceIds?: string[];
/** Player who opened the trade. */
OfferingPlayerId: string;
/** Trade identifier. */
TradeId: string;
}
export interface AcceptTradeResponse {
/** Details about trade which was just accepted. */
Trade?: TradeInfo;
}
export enum AdActivity {
Opened = "Opened",
Closed = "Closed",
Start = "Start",
End = "End",
}
export interface AdCampaignAttributionModel {
/** UTC time stamp of attribution */
AttributedAt: string;
/** Attribution campaign identifier */
CampaignId?: string;
/** Attribution network name */
Platform?: string;
}
export interface AddFriendRequest {
/** Email address of the user to attempt to add to the local user's friend list. */
FriendEmail?: string;
/** PlayFab identifier of the user to attempt to add to the local user's friend list. */
FriendPlayFabId?: string;
/** Title-specific display name of the user to attempt to add to the local user's friend list. */
FriendTitleDisplayName?: string;
/** PlayFab username of the user to attempt to add to the local user's friend list. */
FriendUsername?: string;
}
export interface AddFriendResult {
/** True if the friend request was processed successfully. */
Created: boolean;
}
export interface AddGenericIDRequest {
/** Generic service identifier to add to the player account. */
GenericId: GenericServiceId;
}
export interface AddGenericIDResult {}
/** This API adds a contact email to the player's profile. If the player's profile already contains a contact email, it will update the contact email to the email address specified. */
export interface AddOrUpdateContactEmailRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The new contact email to associate with the player. */
EmailAddress: string;
}
export interface AddOrUpdateContactEmailResult {}
export interface AddSharedGroupMembersRequest {
/** An array of unique PlayFab assigned ID of the user on whom the operation will be performed. */
PlayFabIds: string[];
/** Unique identifier for the shared group. */
SharedGroupId: string;
}
export interface AddSharedGroupMembersResult {}
export interface AddUsernamePasswordRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** User email address attached to their account */
Email: string;
/** Password for the PlayFab account (6-100 characters) */
Password: string;
/** PlayFab username for the account (3-20 characters) */
Username: string;
}
/** Each account must have a unique username and email address in the PlayFab service. Once created, the account may be associated with additional accounts (Steam, Facebook, Game Center, etc.), allowing for added social network lists and achievements systems. This can also be used to provide a recovery method if the user loses their original means of access. */
export interface AddUsernamePasswordResult {
/** PlayFab unique user name. */
Username?: string;
}
/** This API must be enabled for use as an option in the game manager website. It is disabled by default. */
export interface AddUserVirtualCurrencyRequest {
/** Amount to be added to the user balance of the specified virtual currency. */
Amount: number;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Name of the virtual currency which is to be incremented. */
VirtualCurrency: string;
}
/** A single ad placement details including placement and reward information */
export interface AdPlacementDetails {
/** Placement unique ID */
PlacementId?: string;
/** Placement name */
PlacementName?: string;
/** If placement has viewing limits indicates how many views are left */
PlacementViewsRemaining?: number;
/** If placement has viewing limits indicates when they will next reset */
PlacementViewsResetMinutes?: number;
/** Optional URL to a reward asset */
RewardAssetUrl?: string;
/** Reward description */
RewardDescription?: string;
/** Reward unique ID */
RewardId?: string;
/** Reward name */
RewardName?: string;
}
/** Details for each item granted */
export interface AdRewardItemGranted {
/** Catalog ID */
CatalogId?: string;
/** Catalog item display name */
DisplayName?: string;
/** Inventory instance ID */
InstanceId?: string;
/** Item ID */
ItemId?: string;
}
/** Details on what was granted to the player */
export interface AdRewardResults {
/** Array of the items granted to the player */
GrantedItems?: AdRewardItemGranted[];
/** Dictionary of virtual currencies that were granted to the player */
GrantedVirtualCurrencies?: Record<string, unknown>;
/** Dictionary of statistics that were modified for the player */
IncrementedStatistics?: Record<string, unknown>;
}
/** More information can be found on configuring your game for the Google Cloud Messaging service in the Google developer documentation, here: http://developer.android.com/google/gcm/client.html. The steps to configure and send Push Notifications is described in the PlayFab tutorials, here: https://docs.microsoft.com/gaming/playfab/features/engagement/push-notifications/quickstart. */
export interface AndroidDevicePushNotificationRegistrationRequest {
/** Message to display when confirming push notification. */
ConfirmationMessage?: string;
/** Registration ID provided by the Google Cloud Messaging service when the title registered to receive push notifications (see the GCM documentation, here: http://developer.android.com/google/gcm/client.html). */
DeviceToken: string;
/** If true, send a test push message immediately after sucessful registration. Defaults to false. */
SendPushNotificationConfirmation?: boolean;
}
export interface AndroidDevicePushNotificationRegistrationResult {}
/** If you have an ad attribution partner enabled, this will post an install to their service to track the device. It uses the given device id to match based on clicks on ads. */
export interface AttributeInstallRequest {
/** The adid for this device. */
Adid?: string;
/** The IdentifierForAdvertisers for iOS Devices. */
Idfa?: string;
}
export interface AttributeInstallResult {}
export interface CancelTradeRequest {
/** Trade identifier. */
TradeId: string;
}
export interface CancelTradeResponse {
/** Details about trade which was just canceled. */
Trade?: TradeInfo;
}
export interface CartItem {
/** Description of the catalog item. */
Description?: string;
/** Display name for the catalog item. */
DisplayName?: string;
/** Class name to which catalog item belongs. */
ItemClass?: string;
/** Unique identifier for the catalog item. */
ItemId?: string;
/** Unique instance identifier for this catalog item. */
ItemInstanceId?: string;
/** Cost of the catalog item for each applicable real world currency. */
RealCurrencyPrices?: Record<string, unknown>;
/** Amount of each applicable virtual currency which will be received as a result of purchasing this catalog item. */
VCAmount?: Record<string, unknown>;
/** Cost of the catalog item for each applicable virtual currency. */
VirtualCurrencyPrices?: Record<string, unknown>;
}
/** A purchasable item from the item catalog */
export interface CatalogItem {
/** defines the bundle properties for the item - bundles are items which contain other items, including random drop tables and virtual currencies */
Bundle?: CatalogItemBundleInfo;
/** if true, then an item instance of this type can be used to grant a character to a user. */
CanBecomeCharacter: boolean;
/** catalog version for this item */
CatalogVersion?: string;
/** defines the consumable properties (number of uses, timeout) for the item */
Consumable?: CatalogItemConsumableInfo;
/** defines the container properties for the item - what items it contains, including random drop tables and virtual currencies, and what item (if any) is required to open it via the UnlockContainerItem API */
Container?: CatalogItemContainerInfo;
/** game specific custom data */
CustomData?: string;
/** text description of item, to show in-game */
Description?: string;
/** text name for the item, to show in-game */
DisplayName?: string;
/** If the item has IsLImitedEdition set to true, and this is the first time this ItemId has been defined as a limited edition item, this value determines the total number of instances to allocate for the title. Once this limit has been reached, no more instances of this ItemId can be created, and attempts to purchase or grant it will return a Result of false for that ItemId. If the item has already been defined to have a limited edition count, or if this value is less than zero, it will be ignored. */
InitialLimitedEditionCount: number;
/** BETA: If true, then only a fixed number can ever be granted. */
IsLimitedEdition: boolean;
/** if true, then only one item instance of this type will exist and its remaininguses will be incremented instead. RemainingUses will cap out at Int32.Max (2,147,483,647). All subsequent increases will be discarded */
IsStackable: boolean;
/** if true, then an item instance of this type can be traded between players using the trading APIs */
IsTradable: boolean;
/** class to which the item belongs */
ItemClass?: string;
/** unique identifier for this item */
ItemId: string;
/** URL to the item image. For Facebook purchase to display the image on the item purchase page, this must be set to an HTTP URL. */
ItemImageUrl?: string;
/** override prices for this item for specific currencies */
RealCurrencyPrices?: Record<string, unknown>;
/** list of item tags */
Tags?: string[];
/** price of this item in virtual currencies and "RM" (the base Real Money purchase price, in USD pennies) */
VirtualCurrencyPrices?: Record<string, unknown>;
}
export interface CatalogItemBundleInfo {
/** unique ItemId values for all items which will be added to the player inventory when the bundle is added */
BundledItems?: string[];
/** unique TableId values for all RandomResultTable objects which are part of the bundle (random tables will be resolved and add the relevant items to the player inventory when the bundle is added) */
BundledResultTables?: string[];
/** virtual currency types and balances which will be added to the player inventory when the bundle is added */
BundledVirtualCurrencies?: Record<string, unknown>;
}
export interface CatalogItemConsumableInfo {
/** number of times this object can be used, after which it will be removed from the player inventory */
UsageCount?: number;
/** duration in seconds for how long the item will remain in the player inventory - once elapsed, the item will be removed (recommended minimum value is 5 seconds, as lower values can cause the item to expire before operations depending on this item's details have completed) */
UsagePeriod?: number;
/** all inventory item instances in the player inventory sharing a non-null UsagePeriodGroup have their UsagePeriod values added together, and share the result - when that period has elapsed, all the items in the group will be removed */
UsagePeriodGroup?: string;
}
/** Containers are inventory items that can hold other items defined in the catalog, as well as virtual currency, which is added to the player inventory when the container is unlocked, using the UnlockContainerItem API. The items can be anything defined in the catalog, as well as RandomResultTable objects which will be resolved when the container is unlocked. Containers and their keys should be defined as Consumable (having a limited number of uses) in their catalog defintiions, unless the intent is for the player to be able to re-use them infinitely. */
export interface CatalogItemContainerInfo {
/** unique ItemId values for all items which will be added to the player inventory, once the container has been unlocked */
ItemContents?: string[];
/** ItemId for the catalog item used to unlock the container, if any (if not specified, a call to UnlockContainerItem will open the container, adding the contents to the player inventory and currency balances) */
KeyItemId?: string;
/** unique TableId values for all RandomResultTable objects which are part of the container (once unlocked, random tables will be resolved and add the relevant items to the player inventory) */
ResultTableContents?: string[];
/** virtual currency types and balances which will be added to the player inventory when the container is unlocked */
VirtualCurrencyContents?: Record<string, unknown>;
}
export interface CharacterInventory {
/** The id of this character. */
CharacterId?: string;
/** The inventory of this character. */
Inventory?: ItemInstance[];
}
export interface CharacterLeaderboardEntry {
/** PlayFab unique identifier of the character that belongs to the user for this leaderboard entry. */
CharacterId?: string;
/** Title-specific display name of the character for this leaderboard entry. */
CharacterName?: string;
/** Name of the character class for this entry. */
CharacterType?: string;
/** Title-specific display name of the user for this leaderboard entry. */
DisplayName?: string;
/** PlayFab unique identifier of the user for this leaderboard entry. */
PlayFabId?: string;
/** User's overall position in the leaderboard. */
Position: number;
/** Specific value of the user's statistic. */
StatValue: number;
}
export interface CharacterResult {
/** The id for this character on this player. */
CharacterId?: string;
/** The name of this character. */
CharacterName?: string;
/** The type-string that was given to this character on creation. */
CharacterType?: string;
}
export enum CloudScriptRevisionOption {
Live = "Live",
Latest = "Latest",
Specific = "Specific",
}
/** Collection filter to include and/or exclude collections with certain key-value pairs. The filter generates a collection set defined by Includes rules and then remove collections that matches the Excludes rules. A collection is considered matching a rule if the rule describes a subset of the collection. */
export interface CollectionFilter {
/** List of Exclude rules, with any of which if a collection matches, it is excluded by the filter. */
Excludes?: Container_Dictionary_String_String[];
/** List of Include rules, with any of which if a collection matches, it is included by the filter, unless it is excluded by one of the Exclude rule */
Includes?: Container_Dictionary_String_String[];
}
/** The final step in the purchasing process, this API finalizes the purchase with the payment provider, where applicable, adding virtual goods to the player inventory (including random drop table resolution and recursive addition of bundled items) and adjusting virtual currency balances for funds used or added. Note that this is a pull operation, and should be polled regularly when a purchase is in progress. Please note that the processing time for inventory grants and purchases increases fractionally the more items are in the inventory, and the more items are in the grant/purchase operation. */
export interface ConfirmPurchaseRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Purchase order identifier returned from StartPurchase. */
OrderId: string;
}
/** When the FailedByPaymentProvider error is returned, it's important to check the ProviderErrorCode, ProviderErrorMessage, and ProviderErrorDetails to understand the specific reason the payment was rejected, as in some rare cases, this may mean that the provider hasn't completed some operation required to finalize the purchase. */
export interface ConfirmPurchaseResult {
/** Array of items purchased. */
Items?: ItemInstance[];
/** Purchase order identifier. */
OrderId?: string;
/** Date and time of the purchase. */
PurchaseDate: string;
}
export interface ConsumeItemRequest {
/** Unique PlayFab assigned ID for a specific character owned by a user */
CharacterId?: string;
/** Number of uses to consume from the item. */
ConsumeCount: number;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Unique instance identifier of the item to be consumed. */
ItemInstanceId: string;
}
export interface ConsumeItemResult {
/** Unique instance identifier of the item with uses consumed. */
ItemInstanceId?: string;
/** Number of uses remaining on the item. */
RemainingUses: number;
}
export interface ConsumeMicrosoftStoreEntitlementsRequest {
/** Catalog version to use */
CatalogVersion?: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Marketplace specific payload containing details to fetch in app purchase transactions */
MarketplaceSpecificData: MicrosoftStorePayload;
}
export interface ConsumeMicrosoftStoreEntitlementsResponse {
/** Details for the items purchased. */
Items?: ItemInstance[];
}
export interface ConsumePS5EntitlementsRequest {
/** Catalog version to use */
CatalogVersion?: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Marketplace specific payload containing details to fetch in app purchase transactions */
MarketplaceSpecificData: PlayStation5Payload;
}
export interface ConsumePS5EntitlementsResult {
/** Details for the items purchased. */
Items?: ItemInstance[];
}
export interface ConsumePSNEntitlementsRequest {
/** Which catalog to match granted entitlements against. If null, defaults to title default catalog */
CatalogVersion?: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Id of the PSN service label to consume entitlements from */
ServiceLabel: number;
}
export interface ConsumePSNEntitlementsResult {
/** Array of items granted to the player as a result of consuming entitlements. */
ItemsGranted?: ItemInstance[];
}
export interface ConsumeXboxEntitlementsRequest {
/** Catalog version to use */
CatalogVersion?: string;
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** Token provided by the Xbox Live SDK/XDK method GetTokenAndSignatureAsync("POST", "https://playfabapi.com/", ""). */
XboxToken: string;
}
export interface ConsumeXboxEntitlementsResult {
/** Details for the items purchased. */
Items?: ItemInstance[];
}
export interface ContactEmailInfoModel {
/** The email address */
EmailAddress?: string;
/** The name of the email info data */
Name?: string;
/** The verification status of the email */
VerificationStatus?: EmailVerificationStatus;
}
/** A data container */
export interface Container_Dictionary_String_String {
/** Content of data */
Data?: Record<string, unknown>;
}
export enum ContinentCode {
AF = "AF",
AN = "AN",
AS = "AS",
EU = "EU",
NA = "NA",
OC = "OC",
SA = "SA",
}
export enum CountryCode {
AF = "AF",
AX = "AX",
AL = "AL",
DZ = "DZ",
AS = "AS",
AD = "AD",
AO = "AO",
AI = "AI",
AQ = "AQ",
AG = "AG",
AR = "AR",
AM = "AM",
AW = "AW",
AU = "AU",
AT = "AT",
AZ = "AZ",
BS = "BS",
BH = "BH",
BD = "BD",
BB = "BB",
BY = "BY",
BE = "BE",
BZ = "BZ",
BJ = "BJ",
BM = "BM",
BT = "BT",
BO = "BO",
BQ = "BQ",
BA = "BA",
BW = "BW",
BV = "BV",
BR = "BR",
IO = "IO",
BN = "BN",
BG = "BG",
BF = "BF",
BI = "BI",
KH = "KH",
CM = "CM",
CA = "CA",
CV = "CV",
KY = "KY",
CF = "CF",
TD = "TD",
CL = "CL",
CN = "CN",
CX = "CX",
CC = "CC",
CO = "CO",
KM = "KM",
CG = "CG",
CD = "CD",
CK = "CK",
CR = "CR",
CI = "CI",
HR = "HR",
CU = "CU",
CW = "CW",
CY = "CY",
CZ = "CZ",
DK = "DK",
DJ = "DJ",
DM = "DM",
DO = "DO",
EC = "EC",
EG = "EG",
SV = "SV",
GQ = "GQ",
ER = "ER",
EE = "EE",
ET = "ET",
FK = "FK",
FO = "FO",
FJ = "FJ",
FI = "FI",
FR = "FR",
GF = "GF",
PF = "PF",
TF = "TF",
GA = "GA",
GM = "GM",
GE = "GE",
DE = "DE",
GH = "GH",
GI = "GI",
GR = "GR",
GL = "GL",
GD = "GD",
GP = "GP",
GU = "GU",
GT = "GT",
GG = "GG",
GN = "GN",
GW = "GW",
GY = "GY",
HT = "HT",
HM = "HM",
VA = "VA",
HN = "HN",
HK = "HK",
HU = "HU",
IS = "IS",
IN = "IN",
ID = "ID",
IR = "IR",
IQ = "IQ",
IE = "IE",
IM = "IM",
IL = "IL",
IT = "IT",
JM = "JM",
JP = "JP",
JE = "JE",
JO = "JO",
KZ = "KZ",
KE = "KE",
KI = "KI",
KP = "KP",
KR = "KR",
KW = "KW",
KG = "KG",
LA = "LA",
LV = "LV",
LB = "LB",
LS = "LS",
LR = "LR",
LY = "LY",
LI = "LI",
LT = "LT",
LU = "LU",
MO = "MO",
MK = "MK",
MG = "MG",
MW = "MW",
MY = "MY",
MV = "MV",
ML = "ML",
MT = "MT",
MH = "MH",
MQ = "MQ",
MR = "MR",
MU = "MU",
YT = "YT",
MX = "MX",
FM = "FM",
MD = "MD",
MC = "MC",
MN = "MN",
ME = "ME",
MS = "MS",
MA = "MA",
MZ = "MZ",
MM = "MM",
NA = "NA",
NR = "NR",
NP = "NP",
NL = "NL",
NC = "NC",
NZ = "NZ",
NI = "NI",
NE = "NE",
NG = "NG",
NU = "NU",
NF = "NF",
MP = "MP",
NO = "NO",
OM = "OM",
PK = "PK",
PW = "PW",
PS = "PS",
PA = "PA",
PG = "PG",
PY = "PY",
PE = "PE",
PH = "PH",
PN = "PN",
PL = "PL",
PT = "PT",
PR = "PR",
QA = "QA",
RE = "RE",
RO = "RO",
RU = "RU",
RW = "RW",
BL = "BL",
SH = "SH",
KN = "KN",
LC = "LC",
MF = "MF",
PM = "PM",
VC = "VC",
WS = "WS",
SM = "SM",
ST = "ST",
SA = "SA",
SN = "SN",
RS = "RS",
SC = "SC",
SL = "SL",
SG = "SG",
SX = "SX",
SK = "SK",
SI = "SI",
SB = "SB",
SO = "SO",
ZA = "ZA",
GS = "GS",
SS = "SS",
ES = "ES",
LK = "LK",
SD = "SD",
SR = "SR",
SJ = "SJ",
SZ = "SZ",
SE = "SE",
CH = "CH",
SY = "SY",
TW = "TW",
TJ = "TJ",
TZ = "TZ",
TH = "TH",
TL = "TL",
TG = "TG",
TK = "TK",
TO = "TO",
TT = "TT",
TN = "TN",
TR = "TR",
TM = "TM",
TC = "TC",
TV = "TV",
UG = "UG",
UA = "UA",
AE = "AE",
GB = "GB",
US = "US",
UM = "UM",
UY = "UY",
UZ = "UZ",
VU = "VU",
VE = "VE",
VN = "VN",
VG = "VG",
VI = "VI",
WF = "WF",
EH = "EH",
YE = "YE",
ZM = "ZM",
ZW = "ZW",
}
/** If SharedGroupId is specified, the service will attempt to create a group with that identifier, and will return an error if it is already in use. If no SharedGroupId is specified, a random identifier will be assigned. */
export interface CreateSharedGroupRequest {
/** Unique identifier for the shared group (a random identifier will be assigned, if one is not specified). */
SharedGroupId?: string;
}
export interface CreateSharedGroupResult {
/** Unique identifier for the shared group. */
SharedGroupId?: string;
}
export enum Currency {
AED = "AED",
AFN = "AFN",
ALL = "ALL",
AMD = "AMD",
ANG = "ANG",
AOA = "AOA",
ARS = "ARS",
AUD = "AUD",
AWG = "AWG",
AZN = "AZN",
BAM = "BAM",
BBD = "BBD",
BDT = "BDT",
BGN = "BGN",
BHD = "BHD",
BIF = "BIF",
BMD = "BMD",
BND = "BND",
BOB = "BOB",
BRL = "BRL",
BSD = "BSD",
BTN = "BTN",
BWP = "BWP",
BYR = "BYR",
BZD = "BZD",
CAD = "CAD",
CDF = "CDF",
CHF = "CHF",
CLP = "CLP",
CNY = "CNY",
COP = "COP",
CRC = "CRC",
CUC = "CUC",
CUP = "CUP",
CVE = "CVE",
CZK = "CZK",
DJF = "DJF",
DKK = "DKK",
DOP = "DOP",
DZD = "DZD",
EGP = "EGP",
ERN = "ERN",
ETB = "ETB",
EUR = "EUR",
FJD = "FJD",
FKP = "FKP",
GBP = "GBP",
GEL = "GEL",
GGP = "GGP",
GHS = "GHS",
GIP = "GIP",
GMD = "GMD",
GNF = "GNF",
GTQ = "GTQ",
GYD = "GYD",
HKD = "HKD",
HNL = "HNL",
HRK = "HRK",
HTG = "HTG",
HUF = "HUF",
IDR = "IDR",
ILS = "ILS",
IMP = "IMP",
INR = "INR",
IQD = "IQD",
IRR = "IRR",
ISK = "ISK",
JEP = "JEP",
JMD = "JMD",
JOD = "JOD",
JPY = "JPY",
KES = "KES",
KGS = "KGS",
KHR = "KHR",
KMF = "KMF",
KPW = "KPW",
KRW = "KRW",
KWD = "KWD",
KYD = "KYD",
KZT = "KZT",
LAK = "LAK",
LBP = "LBP",
LKR = "LKR",
LRD = "LRD",
LSL = "LSL",
LYD = "LYD",
MAD = "MAD",
MDL = "MDL",
MGA = "MGA",
MKD = "MKD",
MMK = "MMK",
MNT = "MNT",
MOP = "MOP",
MRO = "MRO",
MUR = "MUR",
MVR = "MVR",
MWK = "MWK",
MXN = "MXN",
MYR = "MYR",
MZN = "MZN",
NAD = "NAD",
NGN = "NGN",
NIO = "NIO",
NOK = "NOK",
NPR = "NPR",
NZD = "NZD",
OMR = "OMR",
PAB = "PAB",
PEN = "PEN",
PGK = "PGK",
PHP = "PHP",
PKR = "PKR",
PLN = "PLN",
PYG = "PYG",
QAR = "QAR",
RON = "RON",
RSD = "RSD",
RUB = "RUB",
RWF = "RWF",
SAR = "SAR",
SBD = "SBD",
SCR = "SCR",
SDG = "SDG",
SEK = "SEK",
SGD = "SGD",
SHP = "SHP",
SLL = "SLL",
SOS = "SOS",
SPL = "SPL",
SRD = "SRD",
STD = "STD",
SVC = "SVC",
SYP = "SYP",
SZL = "SZL",
THB = "THB",
TJS = "TJS",
TMT = "TMT",
TND = "TND",
TOP = "TOP",
TRY = "TRY",
TTD = "TTD",
TVD = "TVD",
TWD = "TWD",
TZS = "TZS",
UAH = "UAH",
UGX = "UGX",
USD = "USD",
UYU = "UYU",
UZS = "UZS",
VEF = "VEF",
VND = "VND",
VUV = "VUV",
WST = "WST",
XAF = "XAF",
XCD = "XCD",
XDR = "XDR",
XOF = "XOF",
XPF = "XPF",
YER = "YER",
ZAR = "ZAR",
ZMW = "ZMW",
ZWD = "ZWD",
}
export interface CurrentGamesRequest {
/** Build to match against. */
BuildVersion?: string;
/** Game mode to look for. */
GameMode?: string;
/** Region to check for Game Server Instances. */
Region?: Region;
/** Statistic name to find statistic-based matches. */
StatisticName?: string;
/** Filter to include and/or exclude Game Server Instances associated with certain tags. */
TagFilter?: CollectionFilter;
}
export interface CurrentGamesResult {
/** number of games running */
GameCount: number;
/** array of games found */
Games?: GameInfo[];
/** total number of players across all servers */
PlayerCount: number;
}
/** Any arbitrary information collected by the device */
export interface DeviceInfoRequest {
/** Information posted to the PlayStream Event. Currently arbitrary, and specific to the environment sending it. */
Info?: Record<string, unknown>;
}
export enum EmailVerificationStatus {
Unverified = "Unverified",
Pending = "Pending",
Confirmed = "Confirmed",
}
export interface EmptyResponse {}
export interface EmptyResult {}
/** Combined entity type and ID structure which uniquely identifies a single entity. */
export interface EntityKey {
/** Unique ID of the entity. */
Id: string;
/** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */
Type?: string;
}
export interface EntityTokenResponse {
/** The entity id and type. */
Entity?: EntityKey;
/** The token used to set X-EntityToken for all entity based API calls. */
EntityToken?: string;
/** The time the token will expire, if it is an expiring token, in UTC. */
TokenExpiration?: string;
}
export interface ExecuteCloudScriptRequest {
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
CustomTags?: Record<string, unknown>;
/** The name of the CloudScript function to execute */
FunctionName: string;
/** Object that is passed in to the function as the first argument */
FunctionParameter?: Record<string, unknown>;
/** Generate a 'player_executed_cloudscript' PlayStream event containing the results of the function execution and other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager. */
GeneratePlayStreamEvent?: boolean;
/** Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live' executes the current live, published revision, and 'Specific' executes the specified revision. The default value is 'Specific', if the SpeificRevision parameter is specified, otherwise it is 'Live'. */
RevisionSelection?: CloudScriptRevisionOption;
/** The specivic revision to execute, when RevisionSelection is set to 'Specific' */
SpecificRevision?: number;
}
export interface ExecuteCloudScriptResult {
/** Number of PlayFab API requests issued by the CloudScript function */
APIRequestsIssued: number;
/** Information about the error, if any, that occurred during execution */
Error?: ScriptExecutionError;
ExecutionTimeSeconds: number;
/** The name of the function that executed */
FunctionName?: string;
/** The object returned from the CloudScript function, if any */
FunctionResult?: Record<string, unknown>;
/** Flag indicating if the FunctionResult was too large and was subsequently dropped from this event. This only occurs if the total event size is larger than 350KB. */
FunctionResultTooLarge?: boolean;
/** Number of external HTTP requests issued by the CloudScript function */
HttpRequestsIssued: number;
/** Entries logged during the function execution. These include both entries logged in the function code using log.info() and log.error() and error entries for API and HTTP request failures. */
Logs?: LogStatement[];
/** Flag indicating if the logs were too large and were subsequently dropped from this event. This only occurs if the total event size is larger than 350KB after the FunctionResult was removed. */
LogsTooLarge?: boolean;
MemoryConsumedBytes: number;
/** Processor time consumed while executing the function. This does not include time spent waiting on API calls or HTTP requests. */
ProcessorTimeSeconds: number;
/** The revision of the CloudScript that executed */
Revision: number;
}
export interface FacebookInstantGamesPlayFabIdPair {
/** Unique Facebook Instant Games identifier for a user. */
FacebookInstantGamesId?: string;
/** Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Facebook Instant Games identifier. */
PlayFabId?: string;
}
export interface FacebookPlayFabIdPair {
/** Unique Facebook identifier for a user. */
FacebookId?: string;
/** Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Facebook identifier. */
PlayFabId?: string;
}
export interface FriendInfo {
/** Available Facebook information (if the user and PlayFab friend are also connected in Facebook). */
FacebookInfo?: UserFacebookInfo;
/** PlayFab unique identifier for this friend. */
FriendPlayFabId?: string;
/** Available Game Center information (if the user and PlayFab friend are also connected in Game Center). */
GameCenterInfo?: UserGameCenterInfo;
/** The profile of the user, if requested. */
Profile?: PlayerProfileModel;
/** Available PSN information, if the user and PlayFab friend are both connected to PSN. */
PSNInfo?: UserPsnInfo;
/** Available Steam information (if the user and PlayFab friend are also connected in Steam). */
SteamInfo?: UserSteamInfo;
/** Tags which have been associated with this friend. */
Tags?: string[];
/** Title-specific display name for this friend. */
TitleDisplayName?: string;
/** PlayFab unique username for this friend. */
Username?: string;
/** Available Xbox information, if the user and PlayFab friend are both connected to Xbox Live. */
XboxInfo?: UserXboxInfo;
}
export interface GameCenterPlayFabIdPair {
/** Unique Game Center identifier for a user. */
GameCenterId?: string;
/** Unique PlayFab identifier for a user, or null if no PlayFab account is linked to the Game Center identifier. */
PlayFabId?: string;
}
export interface GameInfo {
/** build version this server is running */
BuildVersion?: string;
/** game mode this server is running */