async-playfab-web-sdk 1.192.250526-4 → 1.192.250526-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Addon.d.ts +178 -38
- package/dist/Addon.js +2 -2
- package/dist/Admin.d.ts +2385 -194
- package/dist/Admin.js +2 -2
- package/dist/Authentication.d.ts +31 -4
- package/dist/Authentication.js +2 -2
- package/dist/Client.d.ts +2234 -320
- package/dist/Client.js +2 -2
- package/dist/CloudScript.d.ts +198 -30
- package/dist/CloudScript.js +2 -2
- package/dist/Data.d.ts +136 -17
- package/dist/Data.js +2 -2
- package/dist/Economy.d.ts +1145 -106
- package/dist/Economy.js +2 -2
- package/dist/Events.d.ts +199 -12
- package/dist/Events.js +2 -2
- package/dist/Experimentation.d.ts +163 -16
- package/dist/Experimentation.js +2 -2
- package/dist/Groups.d.ts +266 -27
- package/dist/Groups.js +2 -2
- package/dist/Insights.d.ts +32 -6
- package/dist/Insights.js +2 -2
- package/dist/Localization.d.ts +4 -1
- package/dist/Localization.js +2 -2
- package/dist/Matchmaker.d.ts +271 -0
- package/dist/Matchmaker.js +8 -0
- package/dist/Matchmaker.js.map +1 -0
- package/dist/Multiplayer.d.ts +2696 -168
- package/dist/Multiplayer.js +2 -2
- package/dist/Profiles.d.ts +162 -18
- package/dist/Profiles.js +2 -2
- package/dist/Progression.d.ts +286 -34
- package/dist/Progression.js +2 -2
- package/dist/Server.d.ts +1903 -241
- package/dist/Server.js +2 -2
- package/dist/chunk-3I6ONUUQ.js +237 -0
- package/dist/chunk-3I6ONUUQ.js.map +1 -0
- package/dist/chunk-3O5QT4SL.js +2477 -0
- package/dist/chunk-3O5QT4SL.js.map +1 -0
- package/dist/chunk-3OBHYLBF.js +2673 -0
- package/dist/chunk-3OBHYLBF.js.map +1 -0
- package/dist/chunk-57KYHGBO.js +421 -0
- package/dist/chunk-57KYHGBO.js.map +1 -0
- package/dist/{chunk-CLMINF57.js → chunk-5CWZN75H.js} +6 -3
- package/dist/chunk-5CWZN75H.js.map +1 -0
- package/dist/chunk-73SVDH45.js +197 -0
- package/dist/chunk-73SVDH45.js.map +1 -0
- package/dist/chunk-ADHTNFTN.js +175 -0
- package/dist/chunk-ADHTNFTN.js.map +1 -0
- package/dist/chunk-C7U2JQNZ.js +76 -0
- package/dist/chunk-C7U2JQNZ.js.map +1 -0
- package/dist/{chunk-PXPOK2QU.js → chunk-GAZYZIK2.js} +34 -8
- package/dist/chunk-GAZYZIK2.js.map +1 -0
- package/dist/chunk-J54WY4UN.js +413 -0
- package/dist/chunk-J54WY4UN.js.map +1 -0
- package/dist/chunk-NFWQ4MMZ.js +1048 -0
- package/dist/chunk-NFWQ4MMZ.js.map +1 -0
- package/dist/{chunk-7UQYMDJQ.js → chunk-P7UVG26J.js} +167 -32
- package/dist/chunk-P7UVG26J.js.map +1 -0
- package/dist/chunk-PFXZB4UN.js +2387 -0
- package/dist/chunk-PFXZB4UN.js.map +1 -0
- package/dist/{chunk-RJPMKD7P.js → chunk-QNGQW3YB.js} +28 -6
- package/dist/chunk-QNGQW3YB.js.map +1 -0
- package/dist/chunk-SQWILU5T.js +270 -0
- package/dist/chunk-SQWILU5T.js.map +1 -0
- package/dist/{chunk-FEEE3PRD.js → chunk-SR2RIRLX.js} +1482 -175
- package/dist/chunk-SR2RIRLX.js.map +1 -0
- package/dist/{chunk-6TH6EJYH.js → chunk-XVDYM74A.js} +4 -4
- package/dist/chunk-XVDYM74A.js.map +1 -0
- package/dist/chunk-ZW4TJ3MQ.js +225 -0
- package/dist/chunk-ZW4TJ3MQ.js.map +1 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +29 -25
- package/package.json +2 -2
- package/dist/chunk-2IBLMNAQ.js +0 -882
- package/dist/chunk-2IBLMNAQ.js.map +0 -1
- package/dist/chunk-3TRLETD6.js +0 -119
- package/dist/chunk-3TRLETD6.js.map +0 -1
- package/dist/chunk-4LT3OUQD.js +0 -632
- package/dist/chunk-4LT3OUQD.js.map +0 -1
- package/dist/chunk-6TH6EJYH.js.map +0 -1
- package/dist/chunk-7UQYMDJQ.js.map +0 -1
- package/dist/chunk-CLMINF57.js.map +0 -1
- package/dist/chunk-F5NRBD4O.js +0 -174
- package/dist/chunk-F5NRBD4O.js.map +0 -1
- package/dist/chunk-FEEE3PRD.js.map +0 -1
- package/dist/chunk-HKZJ4H4O.js +0 -97
- package/dist/chunk-HKZJ4H4O.js.map +0 -1
- package/dist/chunk-NJQCK4TL.js +0 -61
- package/dist/chunk-NJQCK4TL.js.map +0 -1
- package/dist/chunk-ONCBQLGS.js +0 -1147
- package/dist/chunk-ONCBQLGS.js.map +0 -1
- package/dist/chunk-PXPOK2QU.js.map +0 -1
- package/dist/chunk-Q22JHX4G.js +0 -76
- package/dist/chunk-Q22JHX4G.js.map +0 -1
- package/dist/chunk-RJPMKD7P.js.map +0 -1
- package/dist/chunk-WROXLFDZ.js +0 -103
- package/dist/chunk-WROXLFDZ.js.map +0 -1
- package/dist/chunk-XAI5IWL4.js +0 -187
- package/dist/chunk-XAI5IWL4.js.map +0 -1
- package/dist/chunk-XM26BUTO.js +0 -384
- package/dist/chunk-XM26BUTO.js.map +0 -1
package/dist/Client.js
CHANGED
package/dist/CloudScript.d.ts
CHANGED
@@ -23,6 +23,11 @@ interface EntityKey {
|
|
23
23
|
Id: string;
|
24
24
|
/** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */
|
25
25
|
Type?: string;
|
26
|
+
/**
|
27
|
+
* Alternate name for Type.
|
28
|
+
* @deprecated Please use Type instead.
|
29
|
+
*/
|
30
|
+
TypeString?: string;
|
26
31
|
}
|
27
32
|
interface EventHubFunctionModel {
|
28
33
|
/** The connection string for the event hub. */
|
@@ -78,17 +83,17 @@ interface ExecuteEntityCloudScriptRequest extends IPlayFabRequestCommon {
|
|
78
83
|
/** Object that is passed in to the function as the first argument */
|
79
84
|
FunctionParameter?: any;
|
80
85
|
/**
|
81
|
-
* Generate a
|
86
|
+
* Generate a 'entity_executed_cloudscript' PlayStream event containing the results of the function execution and other
|
82
87
|
* contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager.
|
83
88
|
*/
|
84
89
|
GeneratePlayStreamEvent?: boolean;
|
85
90
|
/**
|
86
|
-
* Option for which revision of the CloudScript to execute.
|
87
|
-
* executes the current live, published revision, and
|
88
|
-
*
|
91
|
+
* Option for which revision of the CloudScript to execute. 'Latest' executes the most recently created revision, 'Live'
|
92
|
+
* executes the current live, published revision, and 'Specific' executes the specified revision. The default value is
|
93
|
+
* 'Specific', if the SpecificRevision parameter is specified, otherwise it is 'Live'.
|
89
94
|
*/
|
90
95
|
RevisionSelection?: string;
|
91
|
-
/** The specific revision to execute, when RevisionSelection is set to
|
96
|
+
/** The specific revision to execute, when RevisionSelection is set to 'Specific' */
|
92
97
|
SpecificRevision?: number;
|
93
98
|
}
|
94
99
|
interface ExecuteFunctionRequest extends IPlayFabRequestCommon {
|
@@ -101,7 +106,7 @@ interface ExecuteFunctionRequest extends IPlayFabRequestCommon {
|
|
101
106
|
/** Object that is passed in to the function as the FunctionArgument field of the FunctionExecutionContext data structure */
|
102
107
|
FunctionParameter?: any;
|
103
108
|
/**
|
104
|
-
* Generate a
|
109
|
+
* Generate a 'entity_executed_cloudscript_function' PlayStream event containing the results of the function execution and
|
105
110
|
* other contextual information. This event will show up in the PlayStream debugger console for the player in Game Manager.
|
106
111
|
*/
|
107
112
|
GeneratePlayStreamEvent?: boolean;
|
@@ -204,7 +209,7 @@ interface LocationModel {
|
|
204
209
|
interface LogStatement {
|
205
210
|
/** Optional object accompanying the message as contextual information */
|
206
211
|
Data?: any;
|
207
|
-
/**
|
212
|
+
/** 'Debug', 'Info', or 'Error' */
|
208
213
|
Level?: string;
|
209
214
|
Message?: string;
|
210
215
|
}
|
@@ -220,6 +225,8 @@ interface MembershipModel {
|
|
220
225
|
* overridden, this will be the new expiration time.
|
221
226
|
*/
|
222
227
|
OverrideExpiration?: string;
|
228
|
+
/** Whether the override expiration is set. */
|
229
|
+
OverrideIsSet?: boolean;
|
223
230
|
/** The list of subscriptions that this player has for this membership */
|
224
231
|
Subscriptions?: SubscriptionModel[];
|
225
232
|
}
|
@@ -232,7 +239,7 @@ interface NameIdentifier {
|
|
232
239
|
interface PlayerProfileModel {
|
233
240
|
/** List of advertising campaigns the player has been attributed to */
|
234
241
|
AdCampaignAttributions?: AdCampaignAttributionModel[];
|
235
|
-
/** URL of the player
|
242
|
+
/** URL of the player's avatar image */
|
236
243
|
AvatarUrl?: string;
|
237
244
|
/** If the player is currently banned, the UTC Date when the ban expires */
|
238
245
|
BannedUntil?: string;
|
@@ -266,16 +273,16 @@ interface PlayerProfileModel {
|
|
266
273
|
PushNotificationRegistrations?: PushNotificationRegistrationModel[];
|
267
274
|
/** List of leaderboard statistic values for the player */
|
268
275
|
Statistics?: StatisticModel[];
|
269
|
-
/** List of player
|
276
|
+
/** List of player's tags for segmentation */
|
270
277
|
Tags?: TagModel[];
|
271
278
|
/** Title ID this player profile applies to */
|
272
279
|
TitleId?: string;
|
273
280
|
/**
|
274
|
-
* Sum of the player
|
281
|
+
* Sum of the player's purchases made with real-money currencies, converted to US dollars equivalent and represented as a
|
275
282
|
* whole number of cents (1/100 USD). For example, 999 indicates nine dollars and ninety-nine cents.
|
276
283
|
*/
|
277
284
|
TotalValueToDateInUSD?: number;
|
278
|
-
/** List of the player
|
285
|
+
/** List of the player's lifetime purchase totals, summed by real-money currency */
|
279
286
|
ValuesToDate?: ValueToDateModel[];
|
280
287
|
}
|
281
288
|
interface PlayStreamEventEnvelopeModel {
|
@@ -311,6 +318,11 @@ interface PostFunctionResultForFunctionExecutionRequest extends IPlayFabRequestC
|
|
311
318
|
interface PostFunctionResultForPlayerTriggeredActionRequest extends IPlayFabRequestCommon {
|
312
319
|
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
|
313
320
|
CustomTags?: Record<string, string | null>;
|
321
|
+
/**
|
322
|
+
* The optional entity to perform this action on. Defaults to the currently logged in entity.
|
323
|
+
* @deprecated Do not use
|
324
|
+
*/
|
325
|
+
Entity?: EntityKey;
|
314
326
|
/** The result of the function execution. */
|
315
327
|
FunctionResult: ExecuteFunctionResult;
|
316
328
|
/** The player profile the function was invoked with. */
|
@@ -321,6 +333,11 @@ interface PostFunctionResultForPlayerTriggeredActionRequest extends IPlayFabRequ
|
|
321
333
|
interface PostFunctionResultForScheduledTaskRequest extends IPlayFabRequestCommon {
|
322
334
|
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
|
323
335
|
CustomTags?: Record<string, string | null>;
|
336
|
+
/**
|
337
|
+
* The entity to perform this action on.
|
338
|
+
* @deprecated Do not use
|
339
|
+
*/
|
340
|
+
Entity?: EntityKey;
|
324
341
|
/** The result of the function execution */
|
325
342
|
FunctionResult: ExecuteFunctionResult;
|
326
343
|
/** The id of the scheduled task that invoked the function. */
|
@@ -392,7 +409,7 @@ interface SubscriptionModel {
|
|
392
409
|
Expiration: string;
|
393
410
|
/** The time the subscription was orignially purchased */
|
394
411
|
InitialSubscriptionTime: string;
|
395
|
-
/** Whether this subscription is currently active. That is, if Expiration
|
412
|
+
/** Whether this subscription is currently active. That is, if Expiration > now. */
|
396
413
|
IsActive: boolean;
|
397
414
|
/** The status of this subscription, according to the subscription provider. */
|
398
415
|
Status?: string;
|
@@ -418,12 +435,12 @@ interface ValueToDateModel {
|
|
418
435
|
Currency?: string;
|
419
436
|
/**
|
420
437
|
* Total value of the purchases in a whole number of 1/100 monetary units. For example, 999 indicates nine dollars and
|
421
|
-
* ninety-nine cents when Currency is
|
438
|
+
* ninety-nine cents when Currency is 'USD')
|
422
439
|
*/
|
423
440
|
TotalValue: number;
|
424
441
|
/**
|
425
|
-
* Total value of the purchases in a string representation of decimal monetary units. For example,
|
426
|
-
* dollars and ninety-nine cents when Currency is
|
442
|
+
* Total value of the purchases in a string representation of decimal monetary units. For example, '9.99' indicates nine
|
443
|
+
* dollars and ninety-nine cents when Currency is 'USD'.
|
427
444
|
*/
|
428
445
|
TotalValueAsDecimal?: string;
|
429
446
|
}
|
@@ -432,78 +449,229 @@ declare class PlayFabCloudScriptApi extends PlayFabCommon {
|
|
432
449
|
/**
|
433
450
|
* Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
|
434
451
|
* custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
|
435
|
-
*
|
452
|
+
*
|
453
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/executeentitycloudscript Microsoft Documentation}
|
454
|
+
* @example
|
455
|
+
* await cloudscriptClient.ExecuteEntityCloudScript({
|
456
|
+
* "FunctionName": "levelCompleted",
|
457
|
+
* "FunctionParameter": {
|
458
|
+
* "level": 3,
|
459
|
+
* "points": 400
|
460
|
+
* },
|
461
|
+
* "RevisionSelection": "Live",
|
462
|
+
* "GeneratePlayStreamEvent": true,
|
463
|
+
* "Entity": {
|
464
|
+
* "Id": "aaa",
|
465
|
+
* "Type": "title_player_account",
|
466
|
+
* "TypeString": "title_player_account"
|
467
|
+
* }
|
468
|
+
* });
|
436
469
|
*/
|
437
470
|
ExecuteEntityCloudScript(request: ExecuteEntityCloudScriptRequest, extraHeaders?: Record<string, string>): Promise<ExecuteCloudScriptResult>;
|
438
471
|
/**
|
439
472
|
* Cloud Script is one of PlayFab's most versatile features. It allows client code to request execution of any kind of
|
440
473
|
* custom server-side functionality you can implement, and it can be used in conjunction with virtually anything.
|
441
|
-
*
|
474
|
+
*
|
475
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/executefunction Microsoft Documentation}
|
476
|
+
* @example
|
477
|
+
* await cloudscriptClient.ExecuteFunction({
|
478
|
+
* "FunctionName": "LevelCompleted",
|
479
|
+
* "FunctionParameter": {
|
480
|
+
* "level": 3,
|
481
|
+
* "points": 400
|
482
|
+
* },
|
483
|
+
* "GeneratePlayStreamEvent": true,
|
484
|
+
* "Entity": {
|
485
|
+
* "Id": "aaa",
|
486
|
+
* "Type": "title_player_account",
|
487
|
+
* "TypeString": "title_player_account"
|
488
|
+
* }
|
489
|
+
* });
|
442
490
|
*/
|
443
491
|
ExecuteFunction(request: ExecuteFunctionRequest, extraHeaders?: Record<string, string>): Promise<ExecuteFunctionResult>;
|
444
492
|
/**
|
445
493
|
* Gets registered Azure Functions for a given title id and function name.
|
446
|
-
*
|
494
|
+
*
|
495
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/getfunction Microsoft Documentation}
|
496
|
+
* @example
|
497
|
+
* await cloudscriptClient.GetFunction({
|
498
|
+
* "FunctionName": "LevelCompleted"
|
499
|
+
* });
|
447
500
|
*/
|
448
501
|
GetFunction(request: GetFunctionRequest, extraHeaders?: Record<string, string>): Promise<GetFunctionResult>;
|
449
502
|
/**
|
450
503
|
* Lists all currently registered Event Hub triggered Azure Functions for a given title.
|
451
|
-
*
|
504
|
+
*
|
505
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/listeventhubfunctions Microsoft Documentation}
|
506
|
+
* @example
|
507
|
+
* await cloudscriptClient.ListEventHubFunctions({});
|
452
508
|
*/
|
453
509
|
ListEventHubFunctions(request: ListFunctionsRequest, extraHeaders?: Record<string, string>): Promise<ListEventHubFunctionsResult>;
|
454
510
|
/**
|
455
511
|
* Lists all currently registered Azure Functions for a given title.
|
456
|
-
*
|
512
|
+
*
|
513
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/listfunctions Microsoft Documentation}
|
514
|
+
* @example
|
515
|
+
* await cloudscriptClient.ListFunctions({});
|
457
516
|
*/
|
458
517
|
ListFunctions(request: ListFunctionsRequest, extraHeaders?: Record<string, string>): Promise<ListFunctionsResult>;
|
459
518
|
/**
|
460
519
|
* Lists all currently registered HTTP triggered Azure Functions for a given title.
|
461
|
-
*
|
520
|
+
*
|
521
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/listhttpfunctions Microsoft Documentation}
|
522
|
+
* @example
|
523
|
+
* await cloudscriptClient.ListHttpFunctions({});
|
462
524
|
*/
|
463
525
|
ListHttpFunctions(request: ListFunctionsRequest, extraHeaders?: Record<string, string>): Promise<ListHttpFunctionsResult>;
|
464
526
|
/**
|
465
527
|
* Lists all currently registered Queue triggered Azure Functions for a given title.
|
466
|
-
*
|
528
|
+
*
|
529
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/listqueuedfunctions Microsoft Documentation}
|
530
|
+
* @example
|
531
|
+
* await cloudscriptClient.ListQueuedFunctions({});
|
467
532
|
*/
|
468
533
|
ListQueuedFunctions(request: ListFunctionsRequest, extraHeaders?: Record<string, string>): Promise<ListQueuedFunctionsResult>;
|
469
534
|
/**
|
470
535
|
* Generate an entity PlayStream event for the provided function result.
|
471
|
-
*
|
536
|
+
*
|
537
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/postfunctionresultforentitytriggeredaction Microsoft Documentation}
|
538
|
+
* @example
|
539
|
+
* await cloudscriptClient.PostFunctionResultForEntityTriggeredAction({
|
540
|
+
* "FunctionResult": {
|
541
|
+
* "ExecutionTimeMilliseconds": 367,
|
542
|
+
* "FunctionName": "LevelCompleted",
|
543
|
+
* "FunctionResult": {
|
544
|
+
* "newScore": 25,
|
545
|
+
* "isWinner": false
|
546
|
+
* }
|
547
|
+
* },
|
548
|
+
* "Entity": {
|
549
|
+
* "Id": "ID",
|
550
|
+
* "Type": "title_player_account",
|
551
|
+
* "TypeString": "title_player_account"
|
552
|
+
* }
|
553
|
+
* });
|
472
554
|
*/
|
473
555
|
PostFunctionResultForEntityTriggeredAction(request: PostFunctionResultForEntityTriggeredActionRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
474
556
|
/**
|
475
557
|
* Generate an entity PlayStream event for the provided function result.
|
476
|
-
*
|
558
|
+
*
|
559
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/postfunctionresultforfunctionexecution Microsoft Documentation}
|
560
|
+
* @example
|
561
|
+
* await cloudscriptClient.PostFunctionResultForFunctionExecution({
|
562
|
+
* "FunctionResult": {
|
563
|
+
* "ExecutionTimeMilliseconds": 367,
|
564
|
+
* "FunctionName": "LevelCompleted",
|
565
|
+
* "FunctionResult": {
|
566
|
+
* "newScore": 25,
|
567
|
+
* "isWinner": false
|
568
|
+
* }
|
569
|
+
* },
|
570
|
+
* "Entity": {
|
571
|
+
* "Id": "ID",
|
572
|
+
* "Type": "title_player_account",
|
573
|
+
* "TypeString": "title_player_account"
|
574
|
+
* }
|
575
|
+
* });
|
477
576
|
*/
|
478
577
|
PostFunctionResultForFunctionExecution(request: PostFunctionResultForFunctionExecutionRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
479
578
|
/**
|
480
579
|
* Generate a player PlayStream event for the provided function result.
|
481
|
-
*
|
580
|
+
*
|
581
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/postfunctionresultforplayertriggeredaction Microsoft Documentation}
|
582
|
+
* @example
|
583
|
+
* await cloudscriptClient.PostFunctionResultForPlayerTriggeredAction({
|
584
|
+
* "PlayStreamEventEnvelope": {
|
585
|
+
* "EntityId": "1234ABCD",
|
586
|
+
* "EntityType": "title_player_account",
|
587
|
+
* "EventName": "player_logged_in",
|
588
|
+
* "EventNamespace": "com.playfab",
|
589
|
+
* "EventData": "someeventdata",
|
590
|
+
* "EventSettings": "someeventsettings",
|
591
|
+
* "EventToBeDropped": false
|
592
|
+
* },
|
593
|
+
* "PlayerProfile": {
|
594
|
+
* "TitleId": "FFFF",
|
595
|
+
* "PlayerId": "1234ABCD",
|
596
|
+
* "Created": "2019-02-11T20:23:05Z",
|
597
|
+
* "LastLogin": "2020-02-11T20:23:05Z",
|
598
|
+
* "DisplayName": "Gudge"
|
599
|
+
* },
|
600
|
+
* "FunctionResult": {
|
601
|
+
* "ExecutionTimeMilliseconds": 367,
|
602
|
+
* "FunctionName": "LevelCompleted",
|
603
|
+
* "FunctionResult": {
|
604
|
+
* "newScore": 25,
|
605
|
+
* "isWinner": false
|
606
|
+
* }
|
607
|
+
* }
|
608
|
+
* });
|
482
609
|
*/
|
483
610
|
PostFunctionResultForPlayerTriggeredAction(request: PostFunctionResultForPlayerTriggeredActionRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
484
611
|
/**
|
485
612
|
* Generate a PlayStream event for the provided function result.
|
486
|
-
*
|
613
|
+
*
|
614
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/postfunctionresultforscheduledtask Microsoft Documentation}
|
615
|
+
* @example
|
616
|
+
* await cloudscriptClient.PostFunctionResultForScheduledTask({
|
617
|
+
* "ScheduledTaskId": {
|
618
|
+
* "Name": "MyTask",
|
619
|
+
* "Id": "d739e188-22f6-4d13-a4d5-df2e93d4d2f7"
|
620
|
+
* },
|
621
|
+
* "FunctionResult": {
|
622
|
+
* "ExecutionTimeMilliseconds": 367,
|
623
|
+
* "FunctionName": "LevelCompleted",
|
624
|
+
* "FunctionResult": {
|
625
|
+
* "newScore": 25,
|
626
|
+
* "isWinner": false
|
627
|
+
* }
|
628
|
+
* }
|
629
|
+
* });
|
487
630
|
*/
|
488
631
|
PostFunctionResultForScheduledTask(request: PostFunctionResultForScheduledTaskRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
489
632
|
/**
|
490
633
|
* Registers an event hub triggered Azure Function with a title.
|
491
|
-
*
|
634
|
+
*
|
635
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/registereventhubfunction Microsoft Documentation}
|
636
|
+
* @example
|
637
|
+
* await cloudscriptClient.RegisterEventHubFunction({
|
638
|
+
* "EventHubName": "fn-eventhub",
|
639
|
+
* "ConnectionString": "SampleConnectionString",
|
640
|
+
* "FunctionName": "functionName"
|
641
|
+
* });
|
492
642
|
*/
|
493
643
|
RegisterEventHubFunction(request: RegisterEventHubFunctionRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
494
644
|
/**
|
495
645
|
* Registers an HTTP triggered Azure function with a title.
|
496
|
-
*
|
646
|
+
*
|
647
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/registerhttpfunction Microsoft Documentation}
|
648
|
+
* @example
|
649
|
+
* await cloudscriptClient.RegisterHttpFunction({
|
650
|
+
* "FunctionUrl": "http://function.url",
|
651
|
+
* "FunctionName": "functionName"
|
652
|
+
* });
|
497
653
|
*/
|
498
654
|
RegisterHttpFunction(request: RegisterHttpFunctionRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
499
655
|
/**
|
500
656
|
* Registers a queue triggered Azure Function with a title.
|
501
|
-
*
|
657
|
+
*
|
658
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/registerqueuedfunction Microsoft Documentation}
|
659
|
+
* @example
|
660
|
+
* await cloudscriptClient.RegisterQueuedFunction({
|
661
|
+
* "QueueName": "fn-queue",
|
662
|
+
* "ConnectionString": "SampleConnectionString",
|
663
|
+
* "FunctionName": "functionName"
|
664
|
+
* });
|
502
665
|
*/
|
503
666
|
RegisterQueuedFunction(request: RegisterQueuedFunctionRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
504
667
|
/**
|
505
668
|
* Unregisters an Azure Function with a title.
|
506
|
-
*
|
669
|
+
*
|
670
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/cloudscript/server-side-cloud-script/unregisterfunction Microsoft Documentation}
|
671
|
+
* @example
|
672
|
+
* await cloudscriptClient.UnregisterFunction({
|
673
|
+
* "FunctionName": "functionName"
|
674
|
+
* });
|
507
675
|
*/
|
508
676
|
UnregisterFunction(request: UnregisterFunctionRequest, extraHeaders?: Record<string, string>): Promise<EmptyResult>;
|
509
677
|
}
|
package/dist/CloudScript.js
CHANGED
package/dist/Data.d.ts
CHANGED
@@ -8,7 +8,7 @@ interface AbortFileUploadsRequest extends IPlayFabRequestCommon {
|
|
8
8
|
/** Names of the files to have their pending uploads aborted. */
|
9
9
|
FileNames: string[];
|
10
10
|
/**
|
11
|
-
* The expected version of the profile, if set and doesn
|
11
|
+
* The expected version of the profile, if set and doesn't match the current version of the profile the operation will not
|
12
12
|
* be performed.
|
13
13
|
*/
|
14
14
|
ProfileVersion?: number;
|
@@ -27,7 +27,7 @@ interface DeleteFilesRequest extends IPlayFabRequestCommon {
|
|
27
27
|
/** Names of the files to be deleted. */
|
28
28
|
FileNames: string[];
|
29
29
|
/**
|
30
|
-
* The expected version of the profile, if set and doesn
|
30
|
+
* The expected version of the profile, if set and doesn't match the current version of the profile the operation will not
|
31
31
|
* be performed.
|
32
32
|
*/
|
33
33
|
ProfileVersion?: number;
|
@@ -43,13 +43,18 @@ interface EntityKey {
|
|
43
43
|
Id: string;
|
44
44
|
/** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */
|
45
45
|
Type?: string;
|
46
|
+
/**
|
47
|
+
* Alternate name for Type.
|
48
|
+
* @deprecated Please use Type instead.
|
49
|
+
*/
|
50
|
+
TypeString?: string;
|
46
51
|
}
|
47
52
|
interface FinalizeFileUploadsRequest extends IPlayFabRequestCommon {
|
48
53
|
/** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
|
49
54
|
CustomTags?: Record<string, string | null>;
|
50
55
|
/** The entity to perform this action on. */
|
51
56
|
Entity: EntityKey;
|
52
|
-
/** Names of the files to be finalized. Restricted to a-Z, 0-9,
|
57
|
+
/** Names of the files to be finalized. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.' */
|
53
58
|
FileNames: string[];
|
54
59
|
/** The current version of the profile, can be used for concurrency control during updates. */
|
55
60
|
ProfileVersion: number;
|
@@ -57,7 +62,7 @@ interface FinalizeFileUploadsRequest extends IPlayFabRequestCommon {
|
|
57
62
|
interface FinalizeFileUploadsResponse extends IPlayFabResultCommon {
|
58
63
|
/** The entity id and type. */
|
59
64
|
Entity?: EntityKey;
|
60
|
-
/** Collection of metadata for the entity
|
65
|
+
/** Collection of metadata for the entity's files */
|
61
66
|
Metadata?: Record<string, GetFileMetadata>;
|
62
67
|
/** The current version of the profile, can be used for concurrency control during updates. */
|
63
68
|
ProfileVersion: number;
|
@@ -71,7 +76,7 @@ interface GetFileMetadata {
|
|
71
76
|
FileName?: string;
|
72
77
|
/** Last UTC time the file was modified */
|
73
78
|
LastModified: string;
|
74
|
-
/** Storage service
|
79
|
+
/** Storage service's reported byte count */
|
75
80
|
Size: number;
|
76
81
|
}
|
77
82
|
interface GetFilesRequest extends IPlayFabRequestCommon {
|
@@ -83,7 +88,7 @@ interface GetFilesRequest extends IPlayFabRequestCommon {
|
|
83
88
|
interface GetFilesResponse extends IPlayFabResultCommon {
|
84
89
|
/** The entity id and type. */
|
85
90
|
Entity?: EntityKey;
|
86
|
-
/** Collection of metadata for the entity
|
91
|
+
/** Collection of metadata for the entity's files */
|
87
92
|
Metadata?: Record<string, GetFileMetadata>;
|
88
93
|
/** The current version of the profile, can be used for concurrency control during updates. */
|
89
94
|
ProfileVersion: number;
|
@@ -118,10 +123,10 @@ interface InitiateFileUploadsRequest extends IPlayFabRequestCommon {
|
|
118
123
|
CustomTags?: Record<string, string | null>;
|
119
124
|
/** The entity to perform this action on. */
|
120
125
|
Entity: EntityKey;
|
121
|
-
/** Names of the files to be set. Restricted to a-Z, 0-9,
|
126
|
+
/** Names of the files to be set. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.' */
|
122
127
|
FileNames: string[];
|
123
128
|
/**
|
124
|
-
* The expected version of the profile, if set and doesn
|
129
|
+
* The expected version of the profile, if set and doesn't match the current version of the profile the operation will not
|
125
130
|
* be performed.
|
126
131
|
*/
|
127
132
|
ProfileVersion?: number;
|
@@ -139,7 +144,7 @@ interface ObjectResult {
|
|
139
144
|
DataObject?: any;
|
140
145
|
/** Escaped string JSON body of the object, if EscapeObject is true. */
|
141
146
|
EscapedDataObject?: string;
|
142
|
-
/** Name of the object. Restricted to a-Z, 0-9,
|
147
|
+
/** Name of the object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.' */
|
143
148
|
ObjectName?: string;
|
144
149
|
}
|
145
150
|
interface SetObject {
|
@@ -155,7 +160,7 @@ interface SetObject {
|
|
155
160
|
* exists, or no operation will occur if it does not exist. Only one of DataObject or EscapedDataObject fields may be used.
|
156
161
|
*/
|
157
162
|
EscapedDataObject?: string;
|
158
|
-
/** Name of object. Restricted to a-Z, 0-9,
|
163
|
+
/** Name of object. Restricted to a-Z, 0-9, '(', ')', '_', '-' and '.'. */
|
159
164
|
ObjectName: string;
|
160
165
|
}
|
161
166
|
interface SetObjectInfo {
|
@@ -190,37 +195,151 @@ interface SetObjectsResponse extends IPlayFabResultCommon {
|
|
190
195
|
declare class PlayFabDataApi extends PlayFabCommon {
|
191
196
|
/**
|
192
197
|
* Abort pending file uploads to an entity's profile.
|
193
|
-
*
|
198
|
+
*
|
199
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/file/file/abortfileuploads Microsoft Documentation}
|
200
|
+
* @example
|
201
|
+
* await fileClient.AbortFileUploads({
|
202
|
+
* "FileNames": [
|
203
|
+
* "avatar",
|
204
|
+
* "game_state"
|
205
|
+
* ],
|
206
|
+
* "Entity": {
|
207
|
+
* "Id": "ID",
|
208
|
+
* "Type": "title_player_account",
|
209
|
+
* "TypeString": "title_player_account"
|
210
|
+
* }
|
211
|
+
* });
|
194
212
|
*/
|
195
213
|
AbortFileUploads(request: AbortFileUploadsRequest, extraHeaders?: Record<string, string>): Promise<AbortFileUploadsResponse>;
|
196
214
|
/**
|
197
215
|
* Delete files on an entity's profile.
|
198
|
-
*
|
216
|
+
*
|
217
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/file/file/deletefiles Microsoft Documentation}
|
218
|
+
* @example
|
219
|
+
* await fileClient.DeleteFiles({
|
220
|
+
* "FileNames": [
|
221
|
+
* "game_state",
|
222
|
+
* "avatar"
|
223
|
+
* ],
|
224
|
+
* "Entity": {
|
225
|
+
* "Id": "ID",
|
226
|
+
* "Type": "title_player_account",
|
227
|
+
* "TypeString": "title_player_account"
|
228
|
+
* }
|
229
|
+
* });
|
199
230
|
*/
|
200
231
|
DeleteFiles(request: DeleteFilesRequest, extraHeaders?: Record<string, string>): Promise<DeleteFilesResponse>;
|
201
232
|
/**
|
202
233
|
* Finalize file uploads to an entity's profile.
|
203
|
-
*
|
234
|
+
*
|
235
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/file/file/finalizefileuploads Microsoft Documentation}
|
236
|
+
* @example
|
237
|
+
* await fileClient.FinalizeFileUploads({
|
238
|
+
* "ProfileVersion": 0,
|
239
|
+
* "FileNames": [
|
240
|
+
* "avatar",
|
241
|
+
* "game_state"
|
242
|
+
* ],
|
243
|
+
* "Entity": {
|
244
|
+
* "Id": "ID",
|
245
|
+
* "Type": "title_player_account",
|
246
|
+
* "TypeString": "title_player_account"
|
247
|
+
* }
|
248
|
+
* });
|
204
249
|
*/
|
205
250
|
FinalizeFileUploads(request: FinalizeFileUploadsRequest, extraHeaders?: Record<string, string>): Promise<FinalizeFileUploadsResponse>;
|
206
251
|
/**
|
207
252
|
* Retrieves file metadata from an entity's profile.
|
208
|
-
*
|
253
|
+
*
|
254
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/file/file/getfiles Microsoft Documentation}
|
255
|
+
* @example
|
256
|
+
* await fileClient.GetFiles({
|
257
|
+
* "Entity": {
|
258
|
+
* "Id": "ID",
|
259
|
+
* "Type": "title_player_account",
|
260
|
+
* "TypeString": "title_player_account"
|
261
|
+
* }
|
262
|
+
* });
|
209
263
|
*/
|
210
264
|
GetFiles(request: GetFilesRequest, extraHeaders?: Record<string, string>): Promise<GetFilesResponse>;
|
211
265
|
/**
|
212
266
|
* Retrieves objects from an entity's profile.
|
213
|
-
*
|
267
|
+
*
|
268
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/object/object/getobjects Microsoft Documentation}
|
269
|
+
* @example
|
270
|
+
* await objectClient.GetObjects({
|
271
|
+
* "Entity": {
|
272
|
+
* "Id": "ABC90712ABC",
|
273
|
+
* "Type": "title_player_account",
|
274
|
+
* "TypeString": "title_player_account"
|
275
|
+
* }
|
276
|
+
* });
|
214
277
|
*/
|
215
278
|
GetObjects(request: GetObjectsRequest, extraHeaders?: Record<string, string>): Promise<GetObjectsResponse>;
|
216
279
|
/**
|
217
280
|
* Initiates file uploads to an entity's profile.
|
218
|
-
*
|
281
|
+
*
|
282
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/file/file/initiatefileuploads Microsoft Documentation}
|
283
|
+
* @example
|
284
|
+
* await fileClient.InitiateFileUploads({
|
285
|
+
* "FileNames": [
|
286
|
+
* "avatar",
|
287
|
+
* "game_state"
|
288
|
+
* ],
|
289
|
+
* "Entity": {
|
290
|
+
* "Id": "ID",
|
291
|
+
* "Type": "title_player_account",
|
292
|
+
* "TypeString": "title_player_account"
|
293
|
+
* }
|
294
|
+
* });
|
219
295
|
*/
|
220
296
|
InitiateFileUploads(request: InitiateFileUploadsRequest, extraHeaders?: Record<string, string>): Promise<InitiateFileUploadsResponse>;
|
221
297
|
/**
|
222
298
|
* Sets objects on an entity's profile.
|
223
|
-
*
|
299
|
+
*
|
300
|
+
* {@link https://docs.microsoft.com/rest/api/playfab/object/object/setobjects Microsoft Documentation}
|
301
|
+
* @example
|
302
|
+
* await objectClient.SetObjects({
|
303
|
+
* "ExpectedProfileVersion": 5,
|
304
|
+
* "Objects": [
|
305
|
+
* {
|
306
|
+
* "ObjectName": "SaveSate",
|
307
|
+
* "DataObject": {
|
308
|
+
* "PlayerDetails": {
|
309
|
+
* "LastMissionSuccess": "2017-06-15T11:05:19Z",
|
310
|
+
* "LastMissionFailure": "2017-06-12T11:05:19Z",
|
311
|
+
* "MapPosition": [
|
312
|
+
* 22.0,
|
313
|
+
* 37.78
|
314
|
+
* ],
|
315
|
+
* "IsPaidUpgrade": true
|
316
|
+
* },
|
317
|
+
* "GameSettings": {
|
318
|
+
* "Screen": "FriendsList",
|
319
|
+
* "Favorites": [
|
320
|
+
* "Place 1",
|
321
|
+
* "Place 2"
|
322
|
+
* ]
|
323
|
+
* }
|
324
|
+
* },
|
325
|
+
* "SimpleStatements": {
|
326
|
+
* "Read": [
|
327
|
+
* {
|
328
|
+
* "Friend": true
|
329
|
+
* }
|
330
|
+
* ],
|
331
|
+
* "Write": [
|
332
|
+
* "Self"
|
333
|
+
* ]
|
334
|
+
* }
|
335
|
+
* }
|
336
|
+
* ],
|
337
|
+
* "Entity": {
|
338
|
+
* "Id": "A8140AB9109712B",
|
339
|
+
* "Type": "title_player_account",
|
340
|
+
* "TypeString": "title_player_account"
|
341
|
+
* }
|
342
|
+
* });
|
224
343
|
*/
|
225
344
|
SetObjects(request: SetObjectsRequest, extraHeaders?: Record<string, string>): Promise<SetObjectsResponse>;
|
226
345
|
}
|