async-playfab-web-sdk 1.192.250526 → 1.193.250606-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/{Addon.d.mts → Addon.d.ts} +213 -73
  2. package/dist/Addon.js +8 -0
  3. package/dist/Addon.js.map +1 -1
  4. package/dist/{Admin.d.mts → Admin.d.ts} +2547 -356
  5. package/dist/Admin.js +8 -0
  6. package/dist/Admin.js.map +1 -1
  7. package/dist/{Authentication.d.mts → Authentication.d.ts} +36 -9
  8. package/dist/Authentication.js +8 -0
  9. package/dist/Authentication.js.map +1 -1
  10. package/dist/{Client.d.mts → Client.d.ts} +2473 -557
  11. package/dist/Client.js +8 -0
  12. package/dist/Client.js.map +1 -1
  13. package/dist/{CloudScript.d.mts → CloudScript.d.ts} +214 -46
  14. package/dist/CloudScript.js +8 -0
  15. package/dist/CloudScript.js.map +1 -1
  16. package/dist/{Data.d.mts → Data.d.ts} +144 -25
  17. package/dist/Data.js +8 -0
  18. package/dist/Data.js.map +1 -1
  19. package/dist/{Economy.d.mts → Economy.d.ts} +1218 -173
  20. package/dist/Economy.js +8 -0
  21. package/dist/Economy.js.map +1 -1
  22. package/dist/{Events.d.mts → Events.d.ts} +212 -25
  23. package/dist/Events.js +8 -0
  24. package/dist/Events.js.map +1 -1
  25. package/dist/{Experimentation.d.mts → Experimentation.d.ts} +177 -30
  26. package/dist/Experimentation.js +8 -0
  27. package/dist/Experimentation.js.map +1 -1
  28. package/dist/{Groups.d.mts → Groups.d.ts} +306 -67
  29. package/dist/Groups.js +8 -0
  30. package/dist/Groups.js.map +1 -1
  31. package/dist/{Insights.d.mts → Insights.d.ts} +39 -13
  32. package/dist/Insights.js +8 -0
  33. package/dist/Insights.js.map +1 -1
  34. package/dist/{Localization.d.mts → Localization.d.ts} +6 -3
  35. package/dist/Localization.js +8 -0
  36. package/dist/Localization.js.map +1 -1
  37. package/dist/Matchmaker.d.ts +271 -0
  38. package/dist/Matchmaker.js +8 -0
  39. package/dist/Matchmaker.js.map +1 -0
  40. package/dist/{Multiplayer.d.mts → Multiplayer.d.ts} +2829 -301
  41. package/dist/Multiplayer.js +8 -0
  42. package/dist/Multiplayer.js.map +1 -1
  43. package/dist/{PlayFabCommon-BUv4zqXf.d.mts → PlayFabCommon-Dnp_xHg5.d.ts} +6 -10
  44. package/dist/{Profiles.d.mts → Profiles.d.ts} +172 -28
  45. package/dist/Profiles.js +8 -0
  46. package/dist/Profiles.js.map +1 -1
  47. package/dist/{Progression.d.mts → Progression.d.ts} +337 -73
  48. package/dist/Progression.js +8 -0
  49. package/dist/Progression.js.map +1 -1
  50. package/dist/{Server.d.mts → Server.d.ts} +2120 -458
  51. package/dist/Server.js +8 -0
  52. package/dist/Server.js.map +1 -1
  53. package/dist/chunk-4E2KRRDD.js +357 -0
  54. package/dist/chunk-4E2KRRDD.js.map +1 -0
  55. package/dist/chunk-7CBRLK5L.js +22 -0
  56. package/dist/chunk-7CBRLK5L.js.map +1 -0
  57. package/dist/{Localization.mjs → chunk-B6REENP7.js} +43 -94
  58. package/dist/chunk-B6REENP7.js.map +1 -0
  59. package/dist/chunk-DXAOLJHK.js +82 -0
  60. package/dist/chunk-DXAOLJHK.js.map +1 -0
  61. package/dist/chunk-EBJBJXQD.js +421 -0
  62. package/dist/chunk-EBJBJXQD.js.map +1 -0
  63. package/dist/chunk-GJBETVD4.js +237 -0
  64. package/dist/chunk-GJBETVD4.js.map +1 -0
  65. package/dist/chunk-JBOTM62B.js +2387 -0
  66. package/dist/chunk-JBOTM62B.js.map +1 -0
  67. package/dist/chunk-JOLCAGAW.js +2970 -0
  68. package/dist/chunk-JOLCAGAW.js.map +1 -0
  69. package/dist/chunk-KGYLMZG2.js +175 -0
  70. package/dist/chunk-KGYLMZG2.js.map +1 -0
  71. package/dist/chunk-PDLKO3WE.js +2477 -0
  72. package/dist/chunk-PDLKO3WE.js.map +1 -0
  73. package/dist/chunk-PSQSJQ3D.js +2673 -0
  74. package/dist/chunk-PSQSJQ3D.js.map +1 -0
  75. package/dist/chunk-RGHAECKS.js +197 -0
  76. package/dist/chunk-RGHAECKS.js.map +1 -0
  77. package/dist/chunk-SFUUCWPC.js +76 -0
  78. package/dist/chunk-SFUUCWPC.js.map +1 -0
  79. package/dist/chunk-SYWVDBNU.js +270 -0
  80. package/dist/chunk-SYWVDBNU.js.map +1 -0
  81. package/dist/chunk-T5SJ77OD.js +225 -0
  82. package/dist/chunk-T5SJ77OD.js.map +1 -0
  83. package/dist/chunk-VSRO2RWK.js +1048 -0
  84. package/dist/chunk-VSRO2RWK.js.map +1 -0
  85. package/dist/chunk-XPNV2H5D.js +421 -0
  86. package/dist/chunk-XPNV2H5D.js.map +1 -0
  87. package/dist/chunk-Z7SMY2UK.js +82 -0
  88. package/dist/chunk-Z7SMY2UK.js.map +1 -0
  89. package/dist/index.d.ts +18 -0
  90. package/dist/index.js +72 -0
  91. package/dist/index.js.map +1 -1
  92. package/package.json +2 -1
  93. package/dist/Addon.mjs +0 -452
  94. package/dist/Addon.mjs.map +0 -1
  95. package/dist/Admin.mjs +0 -1112
  96. package/dist/Admin.mjs.map +0 -1
  97. package/dist/Authentication.mjs +0 -290
  98. package/dist/Authentication.mjs.map +0 -1
  99. package/dist/Client.mjs +0 -1893
  100. package/dist/Client.mjs.map +0 -1
  101. package/dist/CloudScript.mjs +0 -349
  102. package/dist/CloudScript.mjs.map +0 -1
  103. package/dist/Data.mjs +0 -291
  104. package/dist/Data.mjs.map +0 -1
  105. package/dist/Economy.mjs +0 -614
  106. package/dist/Economy.mjs.map +0 -1
  107. package/dist/Events.mjs +0 -327
  108. package/dist/Events.mjs.map +0 -1
  109. package/dist/Experimentation.mjs +0 -333
  110. package/dist/Experimentation.mjs.map +0 -1
  111. package/dist/Groups.mjs +0 -417
  112. package/dist/Groups.mjs.map +0 -1
  113. package/dist/Insights.mjs +0 -286
  114. package/dist/Insights.mjs.map +0 -1
  115. package/dist/Localization.mjs.map +0 -1
  116. package/dist/Multiplayer.mjs +0 -862
  117. package/dist/Multiplayer.mjs.map +0 -1
  118. package/dist/Profiles.mjs +0 -306
  119. package/dist/Profiles.mjs.map +0 -1
  120. package/dist/Progression.mjs +0 -404
  121. package/dist/Progression.mjs.map +0 -1
  122. package/dist/Server.mjs +0 -1377
  123. package/dist/Server.mjs.map +0 -1
  124. package/dist/index.d.mts +0 -17
  125. package/dist/index.mjs +0 -6007
  126. package/dist/index.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/constants.ts","../src/PlayFabContext.ts","../src/PlayFabCommon.ts"],"sourcesContent":["export interface ISettings {\n /** You must set this value for PlayFabSdk to work properly (Found in the Game Manager for your title, at the PlayFab Website) */\n titleId: string;\n /** For security reasons you must never expose this value to the client or players - You must set this value for Server-APIs to work properly (Found in the Game Manager for your title, at the PlayFab Website) */\n developerSecretKey: string;\n productionServerUrl: string;\n /** Headers to apply to every request */\n globalHeaders?: Record<string, string>;\n /** The name of a customer vertical. This is only for customers running a private cluster. Generally you shouldn't touch this */\n verticalName?: string | null;\n}\n\nexport const ErrorMessages = {\n titleId: \"Must be have settings.titleId set to call this method\",\n loggedIn: \"Must be logged in to call this method\",\n entityToken: \"You must successfully call GetEntityToken before calling this\",\n secretKey: \"Must have settings.developerSecretKey set to call this method\",\n};\n\nexport const AuthInfoMap = {\n \"X-EntityToken\": {\n authAttr: \"entityToken\",\n authError: ErrorMessages.entityToken,\n },\n \"X-Authorization\": {\n authAttr: \"sessionTicket\",\n authError: ErrorMessages.loggedIn,\n },\n \"X-SecretKey\": {\n authAttr: \"developerSecretKey\",\n authError: ErrorMessages.secretKey,\n },\n};\n\nexport default {\n sdkVersion: \"1.193.250606\",\n sdkFingerprint: \"JavaScriptSDK-1.193.250606\",\n buildIdentifier: \"ghactions_async-playfab-web-sdk\",\n defaultSettings: {\n titleId: \"\",\n developerSecretKey: \"\",\n globalHeaders: {},\n productionServerUrl: \".playfabapi.com\",\n verticalName: \"\"\n } as ISettings\n};\n","import constants, { type ISettings } from \"./constants\";\n\nexport type AuthContext = {\n PlayFabId: string | null;\n EntityId: string | null;\n EntityType: string | null;\n SessionTicket: string | null;\n EntityToken: string | null;\n};\n\nexport class PlayFabContext {\n private static _instance: PlayFabContext;\n\n settings: ISettings = constants.defaultSettings;\n\n authenticationContext: AuthContext = {\n PlayFabId: null,\n EntityId: null,\n EntityType: null,\n SessionTicket: null,\n EntityToken: null,\n };\n\n sessionTicket: string | null = null;\n\n entityToken: string | null = null;\n\n private constructor() {}\n\n public static get instance(): PlayFabContext {\n if (!PlayFabContext._instance) {\n PlayFabContext._instance = new PlayFabContext();\n }\n\n return PlayFabContext._instance;\n }\n}\n","import constants, { ISettings, AuthInfoMap, ErrorMessages } from \"./constants\";\nimport { AuthContext, PlayFabContext } from \"./PlayFabContext\";\nimport { IPlayFabError, IPlayFabResultCommon } from \"./types/PlayFab\";\n\nexport class PlayFabCommon {\n buildIdentifier: string = constants.buildIdentifier;\n requestGetParams = {\n sdk: constants.sdkFingerprint,\n } as const;\n errorTitleId = ErrorMessages.titleId;\n private _context = PlayFabContext.instance;\n\n constructor(settings: Partial<ISettings> | undefined = undefined) {\n if (settings) {\n Object.assign(this._context.settings, settings);\n }\n }\n\n get settings() {\n return this._context.settings;\n }\n\n get authenticationContext() {\n return this._context.authenticationContext;\n }\n\n get sessionTicket() {\n return this._context.sessionTicket;\n }\n\n set sessionTicket(value: string | null) {\n this._context.sessionTicket = value;\n }\n\n get entityToken() {\n return this._context.entityToken;\n }\n\n set entityToken(value: string | null) {\n this._context.entityToken = value;\n }\n\n GetServerUrl() {\n if (!(this.settings.productionServerUrl.substring(0, 4) === \"http\")) {\n return `https://${this.settings.verticalName || this.settings.titleId}${\n this.settings.productionServerUrl\n }`;\n } else {\n return this.settings.productionServerUrl;\n }\n }\n\n InjectHeaders(\n xhr: XMLHttpRequest,\n headersObj: Record<string, string> | undefined\n ) {\n if (!headersObj) return;\n\n for (const headerKey in headersObj) {\n try {\n xhr.setRequestHeader(headerKey, headersObj[headerKey]);\n } catch (e) {\n console.log(\n `Failed to append header: ${headerKey} = ${headersObj[headerKey]} Error: ${e}`\n );\n }\n }\n }\n\n async ExecuteRequest<T extends IPlayFabResultCommon>(\n url: string,\n body: any,\n authkey: string | null,\n authValue: string | null,\n extraHeaders?: Record<string, string>\n ) {\n if (body == null) {\n body = {};\n }\n\n const requestBody = JSON.stringify(body);\n\n const apiParams = new URLSearchParams(this.requestGetParams);\n const apiUrl = new URL(\n apiParams.size ? `${url}?${apiParams.toString()}` : url\n );\n\n const response = await fetch(apiUrl.toString(), {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"X-PlayFabSDK\": \"JavaScriptSDK-\" + constants.sdkVersion,\n ...this.settings.globalHeaders,\n ...extraHeaders,\n ...(authkey && authValue ? { [authkey]: authValue } : {}),\n },\n body: requestBody,\n });\n\n const jsonResponse = await response.json();\n\n if (!response.ok || jsonResponse.code !== 200) {\n throw jsonResponse as IPlayFabError;\n }\n\n return jsonResponse as { data: T };\n }\n\n UpdateAuthenticationContext(currentAuthContext: AuthContext, result: any) {\n var authenticationContextUpdates = {} as AuthContext;\n if (result?.PlayFabId) {\n authenticationContextUpdates.PlayFabId = result.PlayFabId;\n }\n if (result?.SessionTicket) {\n authenticationContextUpdates.SessionTicket = result.SessionTicket;\n }\n if (result?.EntityToken) {\n authenticationContextUpdates.EntityId = result.EntityToken.Entity.Id;\n authenticationContextUpdates.EntityType = result.EntityToken.Entity.Type;\n authenticationContextUpdates.EntityToken = result.EntityToken.EntityToken;\n }\n // Update the authenticationContext with values from the result\n currentAuthContext = Object.assign(\n currentAuthContext,\n authenticationContextUpdates\n );\n\n this._context.authenticationContext = currentAuthContext;\n\n return currentAuthContext;\n }\n\n GetAuthInfo(request: any, authKey: string) {\n // Use the most-recently saved authKey, unless one was provided in the request via the AuthenticationContext\n var authError = AuthInfoMap[authKey as keyof typeof AuthInfoMap].authError;\n var authAttr = AuthInfoMap[authKey as keyof typeof AuthInfoMap].authAttr;\n var defaultAuthValue: string | null = null;\n if (authAttr === \"entityToken\") defaultAuthValue = this.entityToken;\n else if (authAttr === \"sessionTicket\")\n defaultAuthValue = this.sessionTicket;\n else if (authAttr === \"developerSecretKey\")\n defaultAuthValue = this.settings.developerSecretKey;\n var authValue = request.AuthenticationContext\n ? request.AuthenticationContext[authAttr]\n : defaultAuthValue;\n return { authKey, authValue, authError };\n }\n\n async ExecuteRequestWrapper<T extends IPlayFabResultCommon>(\n apiURL: string,\n request: any,\n authKey: string | null,\n extraHeaders?: Record<string, string>\n ) {\n var authValue = null;\n if (authKey !== null) {\n const { authError, ...authInfo } = this.GetAuthInfo(request, authKey);\n authKey = authInfo.authKey;\n authValue = authInfo.authValue;\n if (!authValue) throw authError;\n }\n return (\n await this.ExecuteRequest<T>(\n this.GetServerUrl() + apiURL,\n request,\n authKey,\n authValue,\n extraHeaders\n )\n ).data;\n }\n\n GenerateErrorReport(error: IPlayFabError | null): string {\n if (error == null) return \"\";\n var fullErrors = error.errorMessage;\n for (var paramName in error.errorDetails)\n for (var msgIdx in error.errorDetails[paramName])\n fullErrors +=\n \"\\n\" + paramName + \": \" + error.errorDetails[paramName][msgIdx];\n return fullErrors;\n }\n\n ForgetAllCredentials() {\n this._context.sessionTicket = null;\n this._context.entityToken = null;\n }\n}\n"],"mappings":";AAYO,IAAM,gBAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,WAAW;AACb;AAEO,IAAM,cAAc;AAAA,EACzB,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,WAAW,cAAc;AAAA,EAC3B;AAAA,EACA,mBAAmB;AAAA,IACjB,UAAU;AAAA,IACV,WAAW,cAAc;AAAA,EAC3B;AAAA,EACA,eAAe;AAAA,IACb,UAAU;AAAA,IACV,WAAW,cAAc;AAAA,EAC3B;AACF;AAEA,IAAO,oBAAQ;AAAA,EACb,YAAY;AAAA,EACZ,gBAAgB;AA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,MAAM,aAAa,SAAS;AAC7C,sBACE,OAAO,YAAY,OAAO,MAAM,aAAa,SAAS,EAAE,MAAM;AACpE,WAAO;AAAA,EACT;AAAA,EAEA,uBAAuB;AACrB,SAAK,SAAS,gBAAgB;AAC9B,SAAK,SAAS,cAAc;AAAA,EAC9B;AACF;","names":[]}
@@ -0,0 +1,82 @@
1
+ import {
2
+ PlayFabCommon
3
+ } from "./chunk-B6REENP7.js";
4
+
5
+ // src/apis/PlayFabAuthenticationApi.ts
6
+ var PlayFabAuthenticationApi = class extends PlayFabCommon {
7
+ /**
8
+ * Create a game_server entity token and return a new or existing game_server entity.
9
+ *
10
+ * {@link https://docs.microsoft.com/rest/api/playfab/gameserveridentity/authentication/authenticategameserverwithcustomid Microsoft Documentation}
11
+ * @example
12
+ * await gameserveridentityClient.AuthenticateGameServerWithCustomId({
13
+ * "CustomId": "12345678123412341234123456789abc"
14
+ * });
15
+ */
16
+ AuthenticateGameServerWithCustomId(request, extraHeaders) {
17
+ return this.ExecuteRequestWrapper("/GameServerIdentity/AuthenticateGameServerWithCustomId", request, "X-EntityToken", extraHeaders).then((result) => {
18
+ var _a;
19
+ if ((_a = result == null ? void 0 : result.EntityToken) == null ? void 0 : _a.EntityToken)
20
+ this.entityToken = result.EntityToken.EntityToken;
21
+ return result;
22
+ });
23
+ }
24
+ /**
25
+ * Delete a game_server entity.
26
+ *
27
+ * {@link https://docs.microsoft.com/rest/api/playfab/gameserveridentity/authentication/delete Microsoft Documentation}
28
+ * @example
29
+ * await gameserveridentityClient.Delete({
30
+ * "Entity": {
31
+ * "Id": "3D00C64954",
32
+ * "Type": "game_server",
33
+ * "TypeString": "game_server"
34
+ * }
35
+ * });
36
+ */
37
+ Delete(request, extraHeaders) {
38
+ return this.ExecuteRequestWrapper("/GameServerIdentity/Delete", request, "X-EntityToken", extraHeaders);
39
+ }
40
+ /**
41
+ * Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid
42
+ * Entity Token.
43
+ *
44
+ * {@link https://docs.microsoft.com/rest/api/playfab/authentication/authentication/getentitytoken Microsoft Documentation}
45
+ * @example
46
+ * await authenticationClient.GetEntityToken({});
47
+ */
48
+ GetEntityToken(request, extraHeaders) {
49
+ var authKey = null;
50
+ var authValue = null;
51
+ if (!authKey && this.sessionTicket) {
52
+ var authInfo = this.GetAuthInfo(request, authKey = "X-Authorization");
53
+ authKey = authInfo.authKey, authValue = authInfo.authValue;
54
+ }
55
+ if (!authKey && this.settings.developerSecretKey) {
56
+ var authInfo = this.GetAuthInfo(request, authKey = "X-SecretKey");
57
+ authKey = authInfo.authKey, authValue = authInfo.authValue;
58
+ }
59
+ return this.ExecuteRequestWrapper("/Authentication/GetEntityToken", request, authKey, extraHeaders).then((result) => {
60
+ if (result == null ? void 0 : result.EntityToken)
61
+ this.entityToken = result.EntityToken;
62
+ return result;
63
+ });
64
+ }
65
+ /**
66
+ * Method for a server to validate a client provided EntityToken. Only callable by the title entity.
67
+ *
68
+ * {@link https://docs.microsoft.com/rest/api/playfab/authentication/authentication/validateentitytoken Microsoft Documentation}
69
+ * @example
70
+ * await authenticationClient.ValidateEntityToken({
71
+ * "EntityToken": "50c61b9065b27a124a400ee3b95d404313986969"
72
+ * });
73
+ */
74
+ ValidateEntityToken(request, extraHeaders) {
75
+ return this.ExecuteRequestWrapper("/Authentication/ValidateEntityToken", request, "X-EntityToken", extraHeaders);
76
+ }
77
+ };
78
+
79
+ export {
80
+ PlayFabAuthenticationApi
81
+ };
82
+ //# sourceMappingURL=chunk-DXAOLJHK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/apis/PlayFabAuthenticationApi.ts"],"sourcesContent":["import type { EmptyResponse } from \"../types/PlayFab\";\nimport type {\n AuthenticateCustomIdRequest,\n DeleteRequest,\n GetEntityTokenRequest,\n ValidateEntityTokenRequest,\n AuthenticateCustomIdResult,\n GetEntityTokenResponse,\n ValidateEntityTokenResponse,\n} from \"../types/PlayFabAuthenticationApi\";\nimport { PlayFabCommon } from \"../PlayFabCommon\";\n\nexport default class PlayFabAuthenticationApi extends PlayFabCommon {\n\n /**\n * Create a game_server entity token and return a new or existing game_server entity.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/gameserveridentity/authentication/authenticategameserverwithcustomid Microsoft Documentation}\n * @example\n * await gameserveridentityClient.AuthenticateGameServerWithCustomId({\n * \"CustomId\": \"12345678123412341234123456789abc\"\n * });\n */\n AuthenticateGameServerWithCustomId (request: AuthenticateCustomIdRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<AuthenticateCustomIdResult>(\"/GameServerIdentity/AuthenticateGameServerWithCustomId\", request, \"X-EntityToken\", extraHeaders)\n .then(result => {\n if (result?.EntityToken?.EntityToken)\n this.entityToken = result.EntityToken.EntityToken;\n return result;\n });\n }\n\n /**\n * Delete a game_server entity.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/gameserveridentity/authentication/delete Microsoft Documentation}\n * @example\n * await gameserveridentityClient.Delete({\n * \"Entity\": {\n * \"Id\": \"3D00C64954\",\n * \"Type\": \"game_server\",\n * \"TypeString\": \"game_server\"\n * }\n * });\n */\n Delete (request: DeleteRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/GameServerIdentity/Delete\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Method to exchange a legacy AuthenticationTicket or title SecretKey for an Entity Token or to refresh a still valid\n * Entity Token.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/authentication/authentication/getentitytoken Microsoft Documentation}\n * @example\n * await authenticationClient.GetEntityToken({});\n */\n GetEntityToken (request: GetEntityTokenRequest, extraHeaders?: Record<string, string>) {\n var authKey: string | null = null; var authValue: string | null = null;\n if (!authKey && this.sessionTicket) { var authInfo = this.GetAuthInfo(request, authKey=\"X-Authorization\"); authKey = authInfo.authKey, authValue = authInfo.authValue; }\n if (!authKey && this.settings.developerSecretKey) { var authInfo = this.GetAuthInfo(request, authKey=\"X-SecretKey\"); authKey = authInfo.authKey, authValue = authInfo.authValue; }\n return this.ExecuteRequestWrapper<GetEntityTokenResponse>(\"/Authentication/GetEntityToken\", request, authKey, extraHeaders)\n .then(result => {\n if (result?.EntityToken)\n this.entityToken = result.EntityToken;\n return result;\n });\n }\n\n /**\n * Method for a server to validate a client provided EntityToken. Only callable by the title entity.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/authentication/authentication/validateentitytoken Microsoft Documentation}\n * @example\n * await authenticationClient.ValidateEntityToken({\n * \"EntityToken\": \"50c61b9065b27a124a400ee3b95d404313986969\"\n * });\n */\n ValidateEntityToken (request: ValidateEntityTokenRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ValidateEntityTokenResponse>(\"/Authentication/ValidateEntityToken\", request, \"X-EntityToken\", extraHeaders);\n }\n\n};\n"],"mappings":";;;;;AAYA,IAAqB,2BAArB,cAAsD,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWlE,mCAAoC,SAAsC,cAAuC;AAC/G,WAAO,KAAK,sBAAkD,0DAA0D,SAAS,iBAAiB,YAAY,EAC3J,KAAK,YAAU;AAzBtB;AA0BQ,WAAI,sCAAQ,gBAAR,mBAAqB;AACvB,aAAK,cAAc,OAAO,YAAY;AACxC,aAAO;AAAA,IACT,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAeA,OAAQ,SAAwB,cAAuC;AACrE,WAAO,KAAK,sBAAqC,8BAA8B,SAAS,iBAAiB,YAAY;AAAA,EACvH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUA,eAAgB,SAAgC,cAAuC;AACrF,QAAI,UAAyB;AAAM,QAAI,YAA2B;AAClE,QAAI,CAAC,WAAW,KAAK,eAAe;AAAE,UAAI,WAAW,KAAK,YAAY,SAAS,UAAQ,iBAAiB;AAAG,gBAAU,SAAS,SAAS,YAAY,SAAS;AAAA,IAAW;AACvK,QAAI,CAAC,WAAW,KAAK,SAAS,oBAAoB;AAAE,UAAI,WAAW,KAAK,YAAY,SAAS,UAAQ,aAAa;AAAG,gBAAU,SAAS,SAAS,YAAY,SAAS;AAAA,IAAW;AACjL,WAAO,KAAK,sBAA8C,kCAAkC,SAAS,SAAS,YAAY,EACvH,KAAK,YAAU;AACd,UAAI,iCAAQ;AACV,aAAK,cAAc,OAAO;AAC5B,aAAO;AAAA,IACT,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,oBAAqB,SAAqC,cAAuC;AAC/F,WAAO,KAAK,sBAAmD,uCAAuC,SAAS,iBAAiB,YAAY;AAAA,EAC9I;AAEF;","names":[]}
@@ -0,0 +1,421 @@
1
+ import {
2
+ PlayFabCommon
3
+ } from "./chunk-B6REENP7.js";
4
+
5
+ // src/apis/PlayFabProgressionApi.ts
6
+ var PlayFabProgressionApi = class extends PlayFabCommon {
7
+ /**
8
+ * Creates a new leaderboard definition.
9
+ *
10
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/createleaderboarddefinition Microsoft Documentation}
11
+ * @example
12
+ * await leaderboardClient.CreateLeaderboardDefinition({
13
+ * "Name": "HighestScoresByLevel",
14
+ * "EntityType": "title_player_account",
15
+ * "VersionConfiguration": {
16
+ * "ResetInterval": "Manual",
17
+ * "MaxQueryableVersions": 1
18
+ * },
19
+ * "Columns": [
20
+ * {
21
+ * "Name": "Hits",
22
+ * "SortDirection": "Descending"
23
+ * }
24
+ * ],
25
+ * "SizeLimit": 1000
26
+ * });
27
+ */
28
+ CreateLeaderboardDefinition(request, extraHeaders) {
29
+ return this.ExecuteRequestWrapper("/Leaderboard/CreateLeaderboardDefinition", request, "X-EntityToken", extraHeaders);
30
+ }
31
+ /**
32
+ * Create a new entity statistic definition.
33
+ *
34
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/createstatisticdefinition Microsoft Documentation}
35
+ * @example
36
+ * await statisticClient.CreateStatisticDefinition({
37
+ * "Name": "HighestScoresByLevel",
38
+ * "AggregationMethod": "Last",
39
+ * "Columns": [
40
+ * {
41
+ * "AggregationMethod": "Min"
42
+ * }
43
+ * ]
44
+ * });
45
+ */
46
+ CreateStatisticDefinition(request, extraHeaders) {
47
+ return this.ExecuteRequestWrapper("/Statistic/CreateStatisticDefinition", request, "X-EntityToken", extraHeaders);
48
+ }
49
+ /**
50
+ * Deletes a leaderboard definition.
51
+ *
52
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/deleteleaderboarddefinition Microsoft Documentation}
53
+ * @example
54
+ * await leaderboardClient.DeleteLeaderboardDefinition({
55
+ * "Name": "HighestScoresByLevel"
56
+ * });
57
+ */
58
+ DeleteLeaderboardDefinition(request, extraHeaders) {
59
+ return this.ExecuteRequestWrapper("/Leaderboard/DeleteLeaderboardDefinition", request, "X-EntityToken", extraHeaders);
60
+ }
61
+ /**
62
+ * Deletes the specified entries from the given leaderboard.
63
+ *
64
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/deleteleaderboardentries Microsoft Documentation}
65
+ * @example
66
+ * await leaderboardClient.DeleteLeaderboardEntries({
67
+ * "Name": "Points",
68
+ * "EntityIds": [
69
+ * "12802710371",
70
+ * "01849174301"
71
+ * ]
72
+ * });
73
+ */
74
+ DeleteLeaderboardEntries(request, extraHeaders) {
75
+ return this.ExecuteRequestWrapper("/Leaderboard/DeleteLeaderboardEntries", request, "X-EntityToken", extraHeaders);
76
+ }
77
+ /**
78
+ * Delete an entity statistic definition. Will delete all statistics on entity profiles and leaderboards.
79
+ *
80
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/deletestatisticdefinition Microsoft Documentation}
81
+ * @example
82
+ * await statisticClient.DeleteStatisticDefinition({
83
+ * "Name": "HighestScoresByLevel"
84
+ * });
85
+ */
86
+ DeleteStatisticDefinition(request, extraHeaders) {
87
+ return this.ExecuteRequestWrapper("/Statistic/DeleteStatisticDefinition", request, "X-EntityToken", extraHeaders);
88
+ }
89
+ /**
90
+ * Delete statistics on an entity profile. This will remove all rankings from associated leaderboards.
91
+ *
92
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/deletestatistics Microsoft Documentation}
93
+ * @example
94
+ * await statisticClient.DeleteStatistics({
95
+ * "Statistics": [
96
+ * {
97
+ * "Name": "TotalCarTime"
98
+ * },
99
+ * {
100
+ * "Name": "FastestTimesByMap",
101
+ * "Version": 15
102
+ * }
103
+ * ]
104
+ * });
105
+ */
106
+ DeleteStatistics(request, extraHeaders) {
107
+ return this.ExecuteRequestWrapper("/Statistic/DeleteStatistics", request, "X-EntityToken", extraHeaders);
108
+ }
109
+ /**
110
+ * Get the friend leaderboard for the specified entity. A maximum of 25 friend entries are listed in the leaderboard.
111
+ *
112
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getfriendleaderboardforentity Microsoft Documentation}
113
+ * @example
114
+ * await leaderboardClient.GetFriendLeaderboardForEntity({
115
+ * "LeaderboardName": "Points",
116
+ * "ExternalFriendSources": "None"
117
+ * });
118
+ */
119
+ GetFriendLeaderboardForEntity(request, extraHeaders) {
120
+ return this.ExecuteRequestWrapper("/Leaderboard/GetFriendLeaderboardForEntity", request, "X-EntityToken", extraHeaders);
121
+ }
122
+ /**
123
+ * Get the leaderboard for a specific entity type and statistic.
124
+ *
125
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboard Microsoft Documentation}
126
+ * @example
127
+ * await leaderboardClient.GetLeaderboard({
128
+ * "LeaderboardName": "Points",
129
+ * "Version": 2,
130
+ * "StartingPosition": 100,
131
+ * "PageSize": 20
132
+ * });
133
+ */
134
+ GetLeaderboard(request, extraHeaders) {
135
+ return this.ExecuteRequestWrapper("/Leaderboard/GetLeaderboard", request, "X-EntityToken", extraHeaders);
136
+ }
137
+ /**
138
+ * Get the leaderboard around a specific entity.
139
+ *
140
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboardaroundentity Microsoft Documentation}
141
+ * @example
142
+ * await leaderboardClient.GetLeaderboardAroundEntity({
143
+ * "LeaderboardName": "Points",
144
+ * "Version": 2,
145
+ * "MaxSurroundingEntries": 0,
146
+ * "Entity": {
147
+ * "Id": "819478109412",
148
+ * "Type": "title_player_account",
149
+ * "TypeString": "title_player_account"
150
+ * }
151
+ * });
152
+ */
153
+ GetLeaderboardAroundEntity(request, extraHeaders) {
154
+ return this.ExecuteRequestWrapper("/Leaderboard/GetLeaderboardAroundEntity", request, "X-EntityToken", extraHeaders);
155
+ }
156
+ /**
157
+ * Gets the specified leaderboard definition.
158
+ *
159
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboarddefinition Microsoft Documentation}
160
+ * @example
161
+ * await leaderboardClient.GetLeaderboardDefinition({
162
+ * "Name": "HighestScoresByLevel"
163
+ * });
164
+ */
165
+ GetLeaderboardDefinition(request, extraHeaders) {
166
+ return this.ExecuteRequestWrapper("/Leaderboard/GetLeaderboardDefinition", request, "X-EntityToken", extraHeaders);
167
+ }
168
+ /**
169
+ * Get the leaderboard limited to a set of entities.
170
+ *
171
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboardforentities Microsoft Documentation}
172
+ * @example
173
+ * await leaderboardClient.GetLeaderboardForEntities({
174
+ * "LeaderboardName": "Points",
175
+ * "Version": 2,
176
+ * "EntityIds": [
177
+ * "12802710371",
178
+ * "01849174301"
179
+ * ]
180
+ * });
181
+ */
182
+ GetLeaderboardForEntities(request, extraHeaders) {
183
+ return this.ExecuteRequestWrapper("/Leaderboard/GetLeaderboardForEntities", request, "X-EntityToken", extraHeaders);
184
+ }
185
+ /**
186
+ * Get current statistic definition information
187
+ *
188
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatisticdefinition Microsoft Documentation}
189
+ * @example
190
+ * await statisticClient.GetStatisticDefinition({
191
+ * "Name": "Points"
192
+ * });
193
+ */
194
+ GetStatisticDefinition(request, extraHeaders) {
195
+ return this.ExecuteRequestWrapper("/Statistic/GetStatisticDefinition", request, "X-EntityToken", extraHeaders);
196
+ }
197
+ /**
198
+ * Get all current statistic definitions information
199
+ *
200
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatisticdefinitions Microsoft Documentation}
201
+ * @deprecated Please use ListStatisticDefinitions instead.
202
+ */
203
+ GetStatisticDefinitions(request, extraHeaders) {
204
+ return this.ExecuteRequestWrapper("/Statistic/GetStatisticDefinitions", request, "X-EntityToken", extraHeaders);
205
+ }
206
+ /**
207
+ * Gets statistics for the specified entity.
208
+ *
209
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatistics Microsoft Documentation}
210
+ * @example
211
+ * await statisticClient.GetStatistics({
212
+ * "StatisticNames": [
213
+ * "SpeedRuns",
214
+ * "Boosts"
215
+ * ],
216
+ * "Entity": {
217
+ * "Id": "A197412JDA",
218
+ * "Type": "title_player_account",
219
+ * "TypeString": "title_player_account"
220
+ * }
221
+ * });
222
+ */
223
+ GetStatistics(request, extraHeaders) {
224
+ return this.ExecuteRequestWrapper("/Statistic/GetStatistics", request, "X-EntityToken", extraHeaders);
225
+ }
226
+ /**
227
+ * Gets statistics for the specified collection of entities.
228
+ *
229
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatisticsforentities Microsoft Documentation}
230
+ * @example
231
+ * await statisticClient.GetStatisticsForEntities({
232
+ * "Entities": [
233
+ * {
234
+ * "Id": "A197412JDA",
235
+ * "Type": "title_player_account",
236
+ * "TypeString": "title_player_account"
237
+ * },
238
+ * {
239
+ * "Id": "B197412JDB",
240
+ * "Type": "title_player_account",
241
+ * "TypeString": "title_player_account"
242
+ * }
243
+ * ],
244
+ * "StatisticNames": [
245
+ * "SpeedRuns",
246
+ * "Boosts"
247
+ * ]
248
+ * });
249
+ */
250
+ GetStatisticsForEntities(request, extraHeaders) {
251
+ return this.ExecuteRequestWrapper("/Statistic/GetStatisticsForEntities", request, "X-EntityToken", extraHeaders);
252
+ }
253
+ /**
254
+ * Increment a leaderboard version.
255
+ *
256
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/incrementleaderboardversion Microsoft Documentation}
257
+ * @example
258
+ * await leaderboardClient.IncrementLeaderboardVersion({
259
+ * "Name": "HighestScoresByLevel"
260
+ * });
261
+ */
262
+ IncrementLeaderboardVersion(request, extraHeaders) {
263
+ return this.ExecuteRequestWrapper("/Leaderboard/IncrementLeaderboardVersion", request, "X-EntityToken", extraHeaders);
264
+ }
265
+ /**
266
+ * Increment an entity statistic definition version.
267
+ *
268
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/incrementstatisticversion Microsoft Documentation}
269
+ * @example
270
+ * await statisticClient.IncrementStatisticVersion({
271
+ * "Name": "HighestScoresByLevel"
272
+ * });
273
+ */
274
+ IncrementStatisticVersion(request, extraHeaders) {
275
+ return this.ExecuteRequestWrapper("/Statistic/IncrementStatisticVersion", request, "X-EntityToken", extraHeaders);
276
+ }
277
+ /**
278
+ * Lists the leaderboard definitions defined for the Title.
279
+ *
280
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/listleaderboarddefinitions Microsoft Documentation}
281
+ * @example
282
+ * await leaderboardClient.ListLeaderboardDefinitions({});
283
+ */
284
+ ListLeaderboardDefinitions(request, extraHeaders) {
285
+ return this.ExecuteRequestWrapper("/Leaderboard/ListLeaderboardDefinitions", request, "X-EntityToken", extraHeaders);
286
+ }
287
+ /**
288
+ * Get all current statistic definitions information
289
+ *
290
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/liststatisticdefinitions Microsoft Documentation}
291
+ * @example
292
+ * await statisticClient.ListStatisticDefinitions({});
293
+ */
294
+ ListStatisticDefinitions(request, extraHeaders) {
295
+ return this.ExecuteRequestWrapper("/Statistic/ListStatisticDefinitions", request, "X-EntityToken", extraHeaders);
296
+ }
297
+ /**
298
+ * Unlinks a leaderboard definition from it's linked statistic definition.
299
+ *
300
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/unlinkleaderboardfromstatistic Microsoft Documentation}
301
+ * @example
302
+ * await leaderboardClient.UnlinkLeaderboardFromStatistic({
303
+ * "Name": "HighestScoresByLevel",
304
+ * "StatisticName": "HighestScoresByLevel"
305
+ * });
306
+ */
307
+ UnlinkLeaderboardFromStatistic(request, extraHeaders) {
308
+ return this.ExecuteRequestWrapper("/Leaderboard/UnlinkLeaderboardFromStatistic", request, "X-EntityToken", extraHeaders);
309
+ }
310
+ /**
311
+ * Updates a leaderboard definition.
312
+ *
313
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/updateleaderboarddefinition Microsoft Documentation}
314
+ * @example
315
+ * await leaderboardClient.UpdateLeaderboardDefinition({
316
+ * "Name": "HighestScoresByLevel",
317
+ * "VersionConfiguration": {
318
+ * "ResetInterval": "Manual",
319
+ * "MaxQueryableVersions": 1
320
+ * },
321
+ * "SizeLimit": 1000
322
+ * });
323
+ */
324
+ UpdateLeaderboardDefinition(request, extraHeaders) {
325
+ return this.ExecuteRequestWrapper("/Leaderboard/UpdateLeaderboardDefinition", request, "X-EntityToken", extraHeaders);
326
+ }
327
+ /**
328
+ * Adds or updates entries on the specified leaderboard.
329
+ *
330
+ * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/updateleaderboardentries Microsoft Documentation}
331
+ * @example
332
+ * await leaderboardClient.UpdateLeaderboardEntries({
333
+ * "LeaderboardName": "Points",
334
+ * "Entries": [
335
+ * {
336
+ * "Scores": [
337
+ * "100",
338
+ * "200"
339
+ * ],
340
+ * "EntityId": "12802710371"
341
+ * },
342
+ * {
343
+ * "Scores": [
344
+ * "120",
345
+ * "200"
346
+ * ],
347
+ * "EntityId": "01849174301"
348
+ * }
349
+ * ]
350
+ * });
351
+ */
352
+ UpdateLeaderboardEntries(request, extraHeaders) {
353
+ return this.ExecuteRequestWrapper("/Leaderboard/UpdateLeaderboardEntries", request, "X-EntityToken", extraHeaders);
354
+ }
355
+ /**
356
+ * Update an existing entity statistic definition.
357
+ *
358
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/updatestatisticdefinition Microsoft Documentation}
359
+ * @example
360
+ * await statisticClient.UpdateStatisticDefinition({
361
+ * "Name": "HighestScoresByLevel",
362
+ * "VersionConfiguration": {
363
+ * "ResetInterval": "Manual",
364
+ * "MaxQueryableVersions": 2
365
+ * }
366
+ * });
367
+ */
368
+ UpdateStatisticDefinition(request, extraHeaders) {
369
+ return this.ExecuteRequestWrapper("/Statistic/UpdateStatisticDefinition", request, "X-EntityToken", extraHeaders);
370
+ }
371
+ /**
372
+ * Update statistics on an entity profile. Depending on the statistic definition, this may result in entity being ranked on
373
+ * various leaderboards.
374
+ *
375
+ * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/updatestatistics Microsoft Documentation}
376
+ * @example
377
+ * await statisticClient.UpdateStatistics({
378
+ * "Statistics": [
379
+ * {
380
+ * "Name": "RoundsWon",
381
+ * "Value": 0,
382
+ * "Metadata": "BestRun:34.13,Car:13452",
383
+ * "Scores": [
384
+ * "100",
385
+ * "200"
386
+ * ]
387
+ * },
388
+ * {
389
+ * "Name": "FastestTimesByMap",
390
+ * "Value": 0,
391
+ * "Metadata": "Car:13452",
392
+ * "Scores": [
393
+ * "200",
394
+ * "300"
395
+ * ]
396
+ * },
397
+ * {
398
+ * "Name": "TotalCarTime",
399
+ * "Value": 0,
400
+ * "Scores": [
401
+ * "300",
402
+ * "400"
403
+ * ]
404
+ * }
405
+ * ],
406
+ * "Entity": {
407
+ * "Id": "A197412JDA",
408
+ * "Type": "title_player_account",
409
+ * "TypeString": "title_player_account"
410
+ * }
411
+ * });
412
+ */
413
+ UpdateStatistics(request, extraHeaders) {
414
+ return this.ExecuteRequestWrapper("/Statistic/UpdateStatistics", request, "X-EntityToken", extraHeaders);
415
+ }
416
+ };
417
+
418
+ export {
419
+ PlayFabProgressionApi
420
+ };
421
+ //# sourceMappingURL=chunk-EBJBJXQD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/apis/PlayFabProgressionApi.ts"],"sourcesContent":["import type { EmptyResponse } from \"../types/PlayFab\";\nimport type {\n CreateLeaderboardDefinitionRequest,\n CreateStatisticDefinitionRequest,\n DeleteLeaderboardDefinitionRequest,\n DeleteLeaderboardEntriesRequest,\n DeleteStatisticDefinitionRequest,\n DeleteStatisticsRequest,\n GetFriendLeaderboardForEntityRequest,\n GetEntityLeaderboardRequest,\n GetLeaderboardAroundEntityRequest,\n GetLeaderboardDefinitionRequest,\n GetLeaderboardForEntitiesRequest,\n GetStatisticDefinitionRequest,\n GetStatisticDefinitionsRequest,\n GetStatisticsRequest,\n GetStatisticsForEntitiesRequest,\n IncrementLeaderboardVersionRequest,\n IncrementStatisticVersionRequest,\n ListLeaderboardDefinitionsRequest,\n ListStatisticDefinitionsRequest,\n UnlinkLeaderboardFromStatisticRequest,\n UpdateLeaderboardDefinitionRequest,\n UpdateLeaderboardEntriesRequest,\n UpdateStatisticDefinitionRequest,\n UpdateStatisticsRequest,\n DeleteStatisticsResponse,\n GetEntityLeaderboardResponse,\n GetLeaderboardDefinitionResponse,\n GetStatisticDefinitionResponse,\n GetStatisticDefinitionsResponse,\n GetStatisticsResponse,\n GetStatisticsForEntitiesResponse,\n IncrementLeaderboardVersionResponse,\n IncrementStatisticVersionResponse,\n ListLeaderboardDefinitionsResponse,\n ListStatisticDefinitionsResponse,\n UpdateStatisticsResponse,\n} from \"../types/PlayFabProgressionApi\";\nimport { PlayFabCommon } from \"../PlayFabCommon\";\n\nexport default class PlayFabProgressionApi extends PlayFabCommon {\n\n /**\n * Creates a new leaderboard definition.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/createleaderboarddefinition Microsoft Documentation}\n * @example\n * await leaderboardClient.CreateLeaderboardDefinition({\n * \"Name\": \"HighestScoresByLevel\",\n * \"EntityType\": \"title_player_account\",\n * \"VersionConfiguration\": {\n * \"ResetInterval\": \"Manual\",\n * \"MaxQueryableVersions\": 1\n * },\n * \"Columns\": [\n * {\n * \"Name\": \"Hits\",\n * \"SortDirection\": \"Descending\"\n * }\n * ],\n * \"SizeLimit\": 1000\n * });\n */\n CreateLeaderboardDefinition (request: CreateLeaderboardDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Leaderboard/CreateLeaderboardDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Create a new entity statistic definition.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/createstatisticdefinition Microsoft Documentation}\n * @example\n * await statisticClient.CreateStatisticDefinition({\n * \"Name\": \"HighestScoresByLevel\",\n * \"AggregationMethod\": \"Last\",\n * \"Columns\": [\n * {\n * \"AggregationMethod\": \"Min\"\n * }\n * ]\n * });\n */\n CreateStatisticDefinition (request: CreateStatisticDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Statistic/CreateStatisticDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Deletes a leaderboard definition.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/deleteleaderboarddefinition Microsoft Documentation}\n * @example\n * await leaderboardClient.DeleteLeaderboardDefinition({\n * \"Name\": \"HighestScoresByLevel\"\n * });\n */\n DeleteLeaderboardDefinition (request: DeleteLeaderboardDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Leaderboard/DeleteLeaderboardDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Deletes the specified entries from the given leaderboard.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/deleteleaderboardentries Microsoft Documentation}\n * @example\n * await leaderboardClient.DeleteLeaderboardEntries({\n * \"Name\": \"Points\",\n * \"EntityIds\": [\n * \"12802710371\",\n * \"01849174301\"\n * ]\n * });\n */\n DeleteLeaderboardEntries (request: DeleteLeaderboardEntriesRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Leaderboard/DeleteLeaderboardEntries\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Delete an entity statistic definition. Will delete all statistics on entity profiles and leaderboards.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/deletestatisticdefinition Microsoft Documentation}\n * @example\n * await statisticClient.DeleteStatisticDefinition({\n * \"Name\": \"HighestScoresByLevel\"\n * });\n */\n DeleteStatisticDefinition (request: DeleteStatisticDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Statistic/DeleteStatisticDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Delete statistics on an entity profile. This will remove all rankings from associated leaderboards.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/deletestatistics Microsoft Documentation}\n * @example\n * await statisticClient.DeleteStatistics({\n * \"Statistics\": [\n * {\n * \"Name\": \"TotalCarTime\"\n * },\n * {\n * \"Name\": \"FastestTimesByMap\",\n * \"Version\": 15\n * }\n * ]\n * });\n */\n DeleteStatistics (request: DeleteStatisticsRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<DeleteStatisticsResponse>(\"/Statistic/DeleteStatistics\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Get the friend leaderboard for the specified entity. A maximum of 25 friend entries are listed in the leaderboard.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getfriendleaderboardforentity Microsoft Documentation}\n * @example\n * await leaderboardClient.GetFriendLeaderboardForEntity({\n * \"LeaderboardName\": \"Points\",\n * \"ExternalFriendSources\": \"None\"\n * });\n */\n GetFriendLeaderboardForEntity (request: GetFriendLeaderboardForEntityRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetEntityLeaderboardResponse>(\"/Leaderboard/GetFriendLeaderboardForEntity\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Get the leaderboard for a specific entity type and statistic.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboard Microsoft Documentation}\n * @example\n * await leaderboardClient.GetLeaderboard({\n * \"LeaderboardName\": \"Points\",\n * \"Version\": 2,\n * \"StartingPosition\": 100,\n * \"PageSize\": 20\n * });\n */\n GetLeaderboard (request: GetEntityLeaderboardRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetEntityLeaderboardResponse>(\"/Leaderboard/GetLeaderboard\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Get the leaderboard around a specific entity.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboardaroundentity Microsoft Documentation}\n * @example\n * await leaderboardClient.GetLeaderboardAroundEntity({\n * \"LeaderboardName\": \"Points\",\n * \"Version\": 2,\n * \"MaxSurroundingEntries\": 0,\n * \"Entity\": {\n * \"Id\": \"819478109412\",\n * \"Type\": \"title_player_account\",\n * \"TypeString\": \"title_player_account\"\n * }\n * });\n */\n GetLeaderboardAroundEntity (request: GetLeaderboardAroundEntityRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetEntityLeaderboardResponse>(\"/Leaderboard/GetLeaderboardAroundEntity\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Gets the specified leaderboard definition.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboarddefinition Microsoft Documentation}\n * @example\n * await leaderboardClient.GetLeaderboardDefinition({\n * \"Name\": \"HighestScoresByLevel\"\n * });\n */\n GetLeaderboardDefinition (request: GetLeaderboardDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetLeaderboardDefinitionResponse>(\"/Leaderboard/GetLeaderboardDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Get the leaderboard limited to a set of entities.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/getleaderboardforentities Microsoft Documentation}\n * @example\n * await leaderboardClient.GetLeaderboardForEntities({\n * \"LeaderboardName\": \"Points\",\n * \"Version\": 2,\n * \"EntityIds\": [\n * \"12802710371\",\n * \"01849174301\"\n * ]\n * });\n */\n GetLeaderboardForEntities (request: GetLeaderboardForEntitiesRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetEntityLeaderboardResponse>(\"/Leaderboard/GetLeaderboardForEntities\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Get current statistic definition information\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatisticdefinition Microsoft Documentation}\n * @example\n * await statisticClient.GetStatisticDefinition({\n * \"Name\": \"Points\"\n * });\n */\n GetStatisticDefinition (request: GetStatisticDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetStatisticDefinitionResponse>(\"/Statistic/GetStatisticDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Get all current statistic definitions information\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatisticdefinitions Microsoft Documentation}\n * @deprecated Please use ListStatisticDefinitions instead.\n */\n GetStatisticDefinitions (request: GetStatisticDefinitionsRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetStatisticDefinitionsResponse>(\"/Statistic/GetStatisticDefinitions\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Gets statistics for the specified entity.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatistics Microsoft Documentation}\n * @example\n * await statisticClient.GetStatistics({\n * \"StatisticNames\": [\n * \"SpeedRuns\",\n * \"Boosts\"\n * ],\n * \"Entity\": {\n * \"Id\": \"A197412JDA\",\n * \"Type\": \"title_player_account\",\n * \"TypeString\": \"title_player_account\"\n * }\n * });\n */\n GetStatistics (request: GetStatisticsRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetStatisticsResponse>(\"/Statistic/GetStatistics\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Gets statistics for the specified collection of entities.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/getstatisticsforentities Microsoft Documentation}\n * @example\n * await statisticClient.GetStatisticsForEntities({\n * \"Entities\": [\n * {\n * \"Id\": \"A197412JDA\",\n * \"Type\": \"title_player_account\",\n * \"TypeString\": \"title_player_account\"\n * },\n * {\n * \"Id\": \"B197412JDB\",\n * \"Type\": \"title_player_account\",\n * \"TypeString\": \"title_player_account\"\n * }\n * ],\n * \"StatisticNames\": [\n * \"SpeedRuns\",\n * \"Boosts\"\n * ]\n * });\n */\n GetStatisticsForEntities (request: GetStatisticsForEntitiesRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetStatisticsForEntitiesResponse>(\"/Statistic/GetStatisticsForEntities\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Increment a leaderboard version.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/incrementleaderboardversion Microsoft Documentation}\n * @example\n * await leaderboardClient.IncrementLeaderboardVersion({\n * \"Name\": \"HighestScoresByLevel\"\n * });\n */\n IncrementLeaderboardVersion (request: IncrementLeaderboardVersionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<IncrementLeaderboardVersionResponse>(\"/Leaderboard/IncrementLeaderboardVersion\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Increment an entity statistic definition version.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/incrementstatisticversion Microsoft Documentation}\n * @example\n * await statisticClient.IncrementStatisticVersion({\n * \"Name\": \"HighestScoresByLevel\"\n * });\n */\n IncrementStatisticVersion (request: IncrementStatisticVersionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<IncrementStatisticVersionResponse>(\"/Statistic/IncrementStatisticVersion\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Lists the leaderboard definitions defined for the Title.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/listleaderboarddefinitions Microsoft Documentation}\n * @example\n * await leaderboardClient.ListLeaderboardDefinitions({});\n */\n ListLeaderboardDefinitions (request: ListLeaderboardDefinitionsRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ListLeaderboardDefinitionsResponse>(\"/Leaderboard/ListLeaderboardDefinitions\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Get all current statistic definitions information\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/liststatisticdefinitions Microsoft Documentation}\n * @example\n * await statisticClient.ListStatisticDefinitions({});\n */\n ListStatisticDefinitions (request: ListStatisticDefinitionsRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ListStatisticDefinitionsResponse>(\"/Statistic/ListStatisticDefinitions\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Unlinks a leaderboard definition from it's linked statistic definition.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/unlinkleaderboardfromstatistic Microsoft Documentation}\n * @example\n * await leaderboardClient.UnlinkLeaderboardFromStatistic({\n * \"Name\": \"HighestScoresByLevel\",\n * \"StatisticName\": \"HighestScoresByLevel\"\n * });\n */\n UnlinkLeaderboardFromStatistic (request: UnlinkLeaderboardFromStatisticRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Leaderboard/UnlinkLeaderboardFromStatistic\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Updates a leaderboard definition.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/updateleaderboarddefinition Microsoft Documentation}\n * @example\n * await leaderboardClient.UpdateLeaderboardDefinition({\n * \"Name\": \"HighestScoresByLevel\",\n * \"VersionConfiguration\": {\n * \"ResetInterval\": \"Manual\",\n * \"MaxQueryableVersions\": 1\n * },\n * \"SizeLimit\": 1000\n * });\n */\n UpdateLeaderboardDefinition (request: UpdateLeaderboardDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Leaderboard/UpdateLeaderboardDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Adds or updates entries on the specified leaderboard.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/leaderboard/leaderboards/updateleaderboardentries Microsoft Documentation}\n * @example\n * await leaderboardClient.UpdateLeaderboardEntries({\n * \"LeaderboardName\": \"Points\",\n * \"Entries\": [\n * {\n * \"Scores\": [\n * \"100\",\n * \"200\"\n * ],\n * \"EntityId\": \"12802710371\"\n * },\n * {\n * \"Scores\": [\n * \"120\",\n * \"200\"\n * ],\n * \"EntityId\": \"01849174301\"\n * }\n * ]\n * });\n */\n UpdateLeaderboardEntries (request: UpdateLeaderboardEntriesRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Leaderboard/UpdateLeaderboardEntries\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Update an existing entity statistic definition.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/updatestatisticdefinition Microsoft Documentation}\n * @example\n * await statisticClient.UpdateStatisticDefinition({\n * \"Name\": \"HighestScoresByLevel\",\n * \"VersionConfiguration\": {\n * \"ResetInterval\": \"Manual\",\n * \"MaxQueryableVersions\": 2\n * }\n * });\n */\n UpdateStatisticDefinition (request: UpdateStatisticDefinitionRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<EmptyResponse>(\"/Statistic/UpdateStatisticDefinition\", request, \"X-EntityToken\", extraHeaders);\n }\n\n /**\n * Update statistics on an entity profile. Depending on the statistic definition, this may result in entity being ranked on\n * various leaderboards.\n * \n * {@link https://docs.microsoft.com/rest/api/playfab/statistic/statistics/updatestatistics Microsoft Documentation}\n * @example\n * await statisticClient.UpdateStatistics({\n * \"Statistics\": [\n * {\n * \"Name\": \"RoundsWon\",\n * \"Value\": 0,\n * \"Metadata\": \"BestRun:34.13,Car:13452\",\n * \"Scores\": [\n * \"100\",\n * \"200\"\n * ]\n * },\n * {\n * \"Name\": \"FastestTimesByMap\",\n * \"Value\": 0,\n * \"Metadata\": \"Car:13452\",\n * \"Scores\": [\n * \"200\",\n * \"300\"\n * ]\n * },\n * {\n * \"Name\": \"TotalCarTime\",\n * \"Value\": 0,\n * \"Scores\": [\n * \"300\",\n * \"400\"\n * ]\n * }\n * ],\n * \"Entity\": {\n * \"Id\": \"A197412JDA\",\n * \"Type\": \"title_player_account\",\n * \"TypeString\": \"title_player_account\"\n * }\n * });\n */\n UpdateStatistics (request: UpdateStatisticsRequest, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<UpdateStatisticsResponse>(\"/Statistic/UpdateStatistics\", request, \"X-EntityToken\", extraHeaders);\n }\n\n};\n"],"mappings":";;;;;AAyCA,IAAqB,wBAArB,cAAmD,cAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuB/D,4BAA6B,SAA6C,cAAuC;AAC/G,WAAO,KAAK,sBAAqC,4CAA4C,SAAS,iBAAiB,YAAY;AAAA,EACrI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,0BAA2B,SAA2C,cAAuC;AAC3G,WAAO,KAAK,sBAAqC,wCAAwC,SAAS,iBAAiB,Y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