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,8 @@
1
+ import {
2
+ PlayFabEconomyApi
3
+ } from "./chunk-VSRO2RWK.js";
4
+ import "./chunk-B6REENP7.js";
5
+ export {
6
+ PlayFabEconomyApi as default
7
+ };
8
+ //# sourceMappingURL=Economy.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/apis/PlayFabEconomyApi.ts","../src/constants.ts","../src/PlayFabContext.ts","../src/PlayFabCommon.ts"],"sourcesContent":["import type {\n\n AddInventoryItemsRequest,\n CreateDraftItemRequest,\n CreateUploadUrlsRequest,\n DeleteEntityItemReviewsRequest,\n DeleteInventoryCollectionRequest,\n DeleteInventoryItemsRequest,\n DeleteItemRequest,\n ExecuteInventoryOperationsRequest,\n ExecuteTransferOperationsRequest,\n GetCatalogConfigRequest,\n GetDraftItemRequest,\n GetDraftItemsRequest,\n GetEntityDraftItemsRequest,\n GetEntityItemReviewRequest,\n GetInventoryCollectionIdsRequest,\n GetInventoryItemsRequest,\n GetInventoryOperationStatusRequest,\n GetItemRequest,\n GetItemContainersRequest,\n GetItemModerationStateRequest,\n GetItemPublishStatusRequest,\n GetItemReviewsRequest,\n GetItemReviewSummaryRequest,\n GetItemsRequest,\n GetMicrosoftStoreAccessTokensRequest,\n GetTransactionHistoryRequest,\n PublishDraftItemRequest,\n PurchaseInventoryItemsRequest,\n RedeemAppleAppStoreInventoryItemsRequest,\n RedeemGooglePlayInventoryItemsRequest,\n RedeemMicrosoftStoreInventoryItemsRequest,\n RedeemNintendoEShopInventoryItemsRequest,\n RedeemPlayStationStoreInventoryItemsRequest,\n RedeemSteamInventoryItemsRequest,\n ReportItemRequest,\n ReportItemReviewRequest,\n ReviewItemRequest,\n SearchItemsRequest,\n SetItemModerationStateRequest,\n SubmitItemReviewVoteRequest,\n SubtractInventoryItemsRequest,\n TakedownItemReviewsRequest,\n TransferInventoryItemsRequest,\n UpdateCatalogConfigRequest,\n UpdateDraftItemRequest,\n UpdateInventoryItemsRequest,\n AddInventoryItemsResponse,\n CreateDraftItemResponse,\n CreateUploadUrlsResponse,\n DeleteEntityItemReviewsResponse,\n DeleteInventoryCollectionResponse,\n DeleteInventoryItemsResponse,\n DeleteItemResponse,\n ExecuteInventoryOperationsResponse,\n ExecuteTransferOperationsResponse,\n GetCatalogConfigResponse,\n GetDraftItemResponse,\n GetDraftItemsResponse,\n GetEntityDraftItemsResponse,\n GetEntityItemReviewResponse,\n GetInventoryCollectionIdsResponse,\n GetInventoryItemsResponse,\n GetInventoryOperationStatusResponse,\n GetItemResponse,\n GetItemContainersResponse,\n GetItemModerationStateResponse,\n GetItemPublishStatusResponse,\n GetItemReviewsResponse,\n GetItemReviewSummaryResponse,\n GetItemsResponse,\n GetMicrosoftStoreAccessTokensResponse,\n GetTransactionHistoryResponse,\n PublishDraftItemResponse,\n PurchaseInventoryItemsResponse,\n RedeemAppleAppStoreInventoryItemsResponse,\n RedeemGooglePlayInventoryItemsResponse,\n RedeemMicrosoftStoreInventoryItemsResponse,\n RedeemNintendoEShopInventoryItemsResponse,\n RedeemPlayStationStoreInventoryItemsResponse,\n RedeemSteamInventoryItemsResponse,\n ReportItemResponse,\n ReportItemReviewResponse,\n ReviewItemResponse,\n SearchItemsResponse,\n SetItemModerationStateResponse,\n SubmitItemReviewVoteResponse,\n SubtractInventoryItemsResponse,\n TakedownItemReviewsResponse,\n TransferInventoryItemsResponse,\n UpdateCatalogConfigResponse,\n UpdateDraftItemResponse,\n UpdateInventoryItemsResponse,\n} from \"../types/PlayFabEconomyApi\";\nimport { PlayFabCommon } from \"../PlayFabCommon\";\n\nexport default class PlayFabEconomyApi extends PlayFabCommon {\n\n /**\n * Add inventory items. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is uncapped.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/addinventoryitems\n */\n AddInventoryItems (request: AddInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<AddInventoryItemsResponse>(\"/Inventory/AddInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Creates a new item in the working catalog using provided metadata. Note: SAS tokens provided are valid for 1 hour.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/createdraftitem\n */\n CreateDraftItem (request: CreateDraftItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<CreateDraftItemResponse>(\"/Catalog/CreateDraftItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Creates one or more upload URLs which can be used by the client to upload raw file data. Content URls and uploaded\n * content will be garbage collected after 24 hours if not attached to a draft or published item. Detailed pricing info\n * around uploading content can be found here:\n * https://learn.microsoft.com/en-us/gaming/playfab/features/pricing/meters/catalog-meters\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/createuploadurls\n */\n CreateUploadUrls (request: CreateUploadUrlsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<CreateUploadUrlsResponse>(\"/Catalog/CreateUploadUrls\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Deletes all reviews, helpfulness votes, and ratings submitted by the entity specified.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/deleteentityitemreviews\n */\n DeleteEntityItemReviews (request: DeleteEntityItemReviewsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<DeleteEntityItemReviewsResponse>(\"/Catalog/DeleteEntityItemReviews\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Delete an Inventory Collection. More information about Inventory Collections can be found here:\n * https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/collections\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/deleteinventorycollection\n */\n DeleteInventoryCollection (request: DeleteInventoryCollectionRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<DeleteInventoryCollectionResponse>(\"/Inventory/DeleteInventoryCollection\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Delete inventory items\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/deleteinventoryitems\n */\n DeleteInventoryItems (request: DeleteInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<DeleteInventoryItemsResponse>(\"/Inventory/DeleteInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Removes an item from working catalog and all published versions from the public catalog.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/deleteitem\n */\n DeleteItem (request: DeleteItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<DeleteItemResponse>(\"/Catalog/DeleteItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Execute a list of Inventory Operations. A maximum list of 50 operations can be performed by a single request. There is\n * also a limit to 300 items that can be modified/added in a single request. For example, adding a bundle with 50 items\n * counts as 50 items modified. All operations must be done within a single inventory collection. This API has a reduced\n * RPS compared to an individual inventory operation with Player Entities limited to 60 requests in 90 seconds.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/executeinventoryoperations\n */\n ExecuteInventoryOperations (request: ExecuteInventoryOperationsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ExecuteInventoryOperationsResponse>(\"/Inventory/ExecuteInventoryOperations\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Transfer a list of inventory items. A maximum list of 50 operations can be performed by a single request. When the\n * response code is 202, one or more operations did not complete within the timeframe of the request. You can identify the\n * pending operations by looking for OperationStatus = 'InProgress'. You can check on the operation status at anytime\n * within 1 day of the request by passing the TransactionToken to the GetInventoryOperationStatus API.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/executetransferoperations\n */\n ExecuteTransferOperations (request: ExecuteTransferOperationsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ExecuteTransferOperationsResponse>(\"/Inventory/ExecuteTransferOperations\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the configuration for the catalog. Only Title Entities can call this API. There is a limit of 100 requests in 10\n * seconds for this API. More information about the Catalog Config can be found here:\n * https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getcatalogconfig\n */\n GetCatalogConfig (request: GetCatalogConfigRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetCatalogConfigResponse>(\"/Catalog/GetCatalogConfig\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Retrieves an item from the working catalog. This item represents the current working state of the item. GetDraftItem\n * does not work off a cache of the Catalog and should be used when trying to get recent item updates. However, please note\n * that item references data is cached and may take a few moments for changes to propagate. Note: SAS tokens provided are\n * valid for 1 hour.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getdraftitem\n */\n GetDraftItem (request: GetDraftItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetDraftItemResponse>(\"/Catalog/GetDraftItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Retrieves a paginated list of the items from the draft catalog. Up to 50 IDs can be retrieved in a single request.\n * GetDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates. Note:\n * SAS tokens provided are valid for 1 hour.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getdraftitems\n */\n GetDraftItems (request: GetDraftItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetDraftItemsResponse>(\"/Catalog/GetDraftItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Retrieves a paginated list of the items from the draft catalog created by the Entity. Up to 50 items can be returned at\n * once. You can use continuation tokens to paginate through results that return greater than the limit.\n * GetEntityDraftItems does not work off a cache of the Catalog and should be used when trying to get recent item updates.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getentitydraftitems\n */\n GetEntityDraftItems (request: GetEntityDraftItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetEntityDraftItemsResponse>(\"/Catalog/GetEntityDraftItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the submitted review for the specified item by the authenticated entity. Individual ratings and reviews data update\n * in near real time with delays within a few seconds.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getentityitemreview\n */\n GetEntityItemReview (request: GetEntityItemReviewRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetEntityItemReviewResponse>(\"/Catalog/GetEntityItemReview\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Get Inventory Collection Ids. Up to 50 Ids can be returned at once (or 250 with response compression enabled). You can\n * use continuation tokens to paginate through results that return greater than the limit. It can take a few seconds for\n * new collection Ids to show up.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/getinventorycollectionids\n */\n GetInventoryCollectionIds (request: GetInventoryCollectionIdsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetInventoryCollectionIdsResponse>(\"/Inventory/GetInventoryCollectionIds\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Get current inventory items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/getinventoryitems\n */\n GetInventoryItems (request: GetInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetInventoryItemsResponse>(\"/Inventory/GetInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Get the status of an inventory operation using an OperationToken. You can check on the operation status at anytime\n * within 1 day of the request by passing the TransactionToken to the this API.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/getinventoryoperationstatus\n */\n GetInventoryOperationStatus (request: GetInventoryOperationStatusRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetInventoryOperationStatusResponse>(\"/Inventory/GetInventoryOperationStatus\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Retrieves an item from the public catalog. GetItem does not work off a cache of the Catalog and should be used when\n * trying to get recent item updates. However, please note that item references data is cached and may take a few moments\n * for changes to propagate.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitem\n */\n GetItem (request: GetItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetItemResponse>(\"/Catalog/GetItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Search for a given item and return a set of bundles and stores containing the item. Up to 50 items can be returned at\n * once. You can use continuation tokens to paginate through results that return greater than the limit. This API is\n * intended for tooling/automation scenarios and has a reduced RPS with Player Entities limited to 30 requests in 300\n * seconds and Title Entities limited to 100 requests in 10 seconds.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitemcontainers\n */\n GetItemContainers (request: GetItemContainersRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetItemContainersResponse>(\"/Catalog/GetItemContainers\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the moderation state for an item, including the concern category and string reason. More information about\n * moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitemmoderationstate\n */\n GetItemModerationState (request: GetItemModerationStateRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetItemModerationStateResponse>(\"/Catalog/GetItemModerationState\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the status of a publish of an item.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitempublishstatus\n */\n GetItemPublishStatus (request: GetItemPublishStatusRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetItemPublishStatusResponse>(\"/Catalog/GetItemPublishStatus\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Get a paginated set of reviews associated with the specified item. Individual ratings and reviews data update in near\n * real time with delays within a few seconds.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitemreviews\n */\n GetItemReviews (request: GetItemReviewsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetItemReviewsResponse>(\"/Catalog/GetItemReviews\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Get a summary of all ratings and reviews associated with the specified item. Summary ratings data is cached with update\n * data coming within 15 minutes.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitemreviewsummary\n */\n GetItemReviewSummary (request: GetItemReviewSummaryRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetItemReviewSummaryResponse>(\"/Catalog/GetItemReviewSummary\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Retrieves items from the public catalog. Up to 50 items can be returned at once. GetItems does not work off a cache of\n * the Catalog and should be used when trying to get recent item updates. However, please note that item references data is\n * cached and may take a few moments for changes to propagate.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/getitems\n */\n GetItems (request: GetItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetItemsResponse>(\"/Catalog/GetItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets the access tokens.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/getmicrosoftstoreaccesstokens\n */\n GetMicrosoftStoreAccessTokens (request: GetMicrosoftStoreAccessTokensRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetMicrosoftStoreAccessTokensResponse>(\"/Inventory/GetMicrosoftStoreAccessTokens\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Get transaction history for a player. Up to 250 Events can be returned at once. You can use continuation tokens to\n * paginate through results that return greater than the limit. Getting transaction history has a lower RPS limit than\n * getting a Player's inventory with Player Entities having a limit of 30 requests in 300 seconds.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/gettransactionhistory\n */\n GetTransactionHistory (request: GetTransactionHistoryRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetTransactionHistoryResponse>(\"/Inventory/GetTransactionHistory\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Initiates a publish of an item from the working catalog to the public catalog. You can use the GetItemPublishStatus API\n * to track the state of the item publish.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/publishdraftitem\n */\n PublishDraftItem (request: PublishDraftItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<PublishDraftItemResponse>(\"/Catalog/PublishDraftItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Purchase an item or bundle. Up to 10,000 stacks of items can be added to a single inventory collection. Stack size is\n * uncapped.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/purchaseinventoryitems\n */\n PurchaseInventoryItems (request: PurchaseInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<PurchaseInventoryItemsResponse>(\"/Inventory/PurchaseInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Redeem items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/redeemappleappstoreinventoryitems\n */\n RedeemAppleAppStoreInventoryItems (request: RedeemAppleAppStoreInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<RedeemAppleAppStoreInventoryItemsResponse>(\"/Inventory/RedeemAppleAppStoreInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Redeem items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/redeemgoogleplayinventoryitems\n */\n RedeemGooglePlayInventoryItems (request: RedeemGooglePlayInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<RedeemGooglePlayInventoryItemsResponse>(\"/Inventory/RedeemGooglePlayInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Redeem items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/redeemmicrosoftstoreinventoryitems\n */\n RedeemMicrosoftStoreInventoryItems (request: RedeemMicrosoftStoreInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<RedeemMicrosoftStoreInventoryItemsResponse>(\"/Inventory/RedeemMicrosoftStoreInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Redeem items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/redeemnintendoeshopinventoryitems\n */\n RedeemNintendoEShopInventoryItems (request: RedeemNintendoEShopInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<RedeemNintendoEShopInventoryItemsResponse>(\"/Inventory/RedeemNintendoEShopInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Redeem items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/redeemplaystationstoreinventoryitems\n */\n RedeemPlayStationStoreInventoryItems (request: RedeemPlayStationStoreInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<RedeemPlayStationStoreInventoryItemsResponse>(\"/Inventory/RedeemPlayStationStoreInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Redeem items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/redeemsteaminventoryitems\n */\n RedeemSteamInventoryItems (request: RedeemSteamInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<RedeemSteamInventoryItemsResponse>(\"/Inventory/RedeemSteamInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Submit a report for an item, indicating in what way the item is inappropriate.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/reportitem\n */\n ReportItem (request: ReportItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ReportItemResponse>(\"/Catalog/ReportItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Submit a report for a review\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/reportitemreview\n */\n ReportItemReview (request: ReportItemReviewRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ReportItemReviewResponse>(\"/Catalog/ReportItemReview\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Creates or updates a review for the specified item. More information around the caching surrounding item ratings and\n * reviews can be found here:\n * https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/ratings#ratings-design-and-caching\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/reviewitem\n */\n ReviewItem (request: ReviewItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ReviewItemResponse>(\"/Catalog/ReviewItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Executes a search against the public catalog using the provided search parameters and returns a set of paginated\n * results. SearchItems uses a cache of the catalog with item updates taking up to a few minutes to propagate. You should\n * use the GetItem API for when trying to immediately get recent item updates. More information about the Search API can be\n * found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/catalog/search\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/searchitems\n */\n SearchItems (request: SearchItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<SearchItemsResponse>(\"/Catalog/SearchItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Sets the moderation state for an item, including the concern category and string reason. More information about\n * moderation states can be found here: https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/ugc/moderation\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/setitemmoderationstate\n */\n SetItemModerationState (request: SetItemModerationStateRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<SetItemModerationStateResponse>(\"/Catalog/SetItemModerationState\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Submit a vote for a review, indicating whether the review was helpful or unhelpful.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/submititemreviewvote\n */\n SubmitItemReviewVote (request: SubmitItemReviewVoteRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<SubmitItemReviewVoteResponse>(\"/Catalog/SubmitItemReviewVote\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Subtract inventory items.\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/subtractinventoryitems\n */\n SubtractInventoryItems (request: SubtractInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<SubtractInventoryItemsResponse>(\"/Inventory/SubtractInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Submit a request to takedown one or more reviews.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/takedownitemreviews\n */\n TakedownItemReviews (request: TakedownItemReviewsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<TakedownItemReviewsResponse>(\"/Catalog/TakedownItemReviews\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Transfer inventory items. When transferring across collections, a 202 response indicates that the transfer did not\n * complete within the timeframe of the request. You can identify the pending operations by looking for OperationStatus =\n * 'InProgress'. You can check on the operation status at anytime within 1 day of the request by passing the\n * TransactionToken to the GetInventoryOperationStatus API. More information about item transfer scenarios can be found\n * here:\n * https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/inventory/?tabs=inventory-game-manager#transfer-inventory-items\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/transferinventoryitems\n */\n TransferInventoryItems (request: TransferInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<TransferInventoryItemsResponse>(\"/Inventory/TransferInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Updates the configuration for the catalog. Only Title Entities can call this API. There is a limit of 10 requests in 10\n * seconds for this API. More information about the Catalog Config can be found here:\n * https://learn.microsoft.com/en-us/gaming/playfab/features/economy-v2/settings\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/updatecatalogconfig\n */\n UpdateCatalogConfig (request: UpdateCatalogConfigRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<UpdateCatalogConfigResponse>(\"/Catalog/UpdateCatalogConfig\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Update the metadata for an item in the working catalog. Note: SAS tokens provided are valid for 1 hour.\n * https://docs.microsoft.com/rest/api/playfab/economy/catalog/updatedraftitem\n */\n UpdateDraftItem (request: UpdateDraftItemRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<UpdateDraftItemResponse>(\"/Catalog/UpdateDraftItem\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Update inventory items\n * https://docs.microsoft.com/rest/api/playfab/economy/inventory/updateinventoryitems\n */\n UpdateInventoryItems (request: UpdateInventoryItemsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<UpdateInventoryItemsResponse>(\"/Inventory/UpdateInventoryItems\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n};\n","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 GlobalHeaderInjection?: { [key: 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 AuthInfoMap = {\n \"X-EntityToken\": {\n authAttr: \"entityToken\",\n authError: \"errorEntityToken\",\n },\n \"X-Authorization\": {\n authAttr: \"sessionTicket\",\n authError: \"errorLoggedIn\",\n },\n \"X-SecretKey\": {\n authAttr: \"developerSecretKey\",\n authError: \"errorSecretKey\",\n },\n};\n\nexport default {\n sdkVersion: \"1.192.250526\",\n sdkFingerprint: \"JavaScriptSDK-1.192.250526\",\n buildIdentifier: \"custom_async-javascriptsdk\",\n defaultSettings: {\n titleId: \"\",\n developerSecretKey: \"\",\n GlobalHeaderInjection: {},\n productionServerUrl: \".playfabapi.com\",\n verticalName: null\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 } 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 = \"Must be have settings.titleId set to call this method\";\n errorLoggedIn = \"Must be logged in to call this method\";\n errorEntityToken =\n \"You must successfully call GetEntityToken before calling this\";\n errorSecretKey =\n \"Must have settings.developerSecretKey set to call this method\";\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 ExecuteRequest<T extends IPlayFabResultCommon>(\n url: string,\n body: any,\n authkey: string | null,\n authValue: string | null,\n customData: any,\n extraHeaders?: Record<string, string>\n ): Promise<T> {\n return new Promise((resolve, reject) => {\n if (body == null) body = {};\n\n var startTime = new Date().getTime();\n var requestBody = JSON.stringify(body);\n\n var urlArr = [url];\n var getParams = this.requestGetParams;\n if (getParams != null) {\n var firstParam = true;\n for (var key in getParams) {\n if (firstParam) {\n urlArr.push(\"?\");\n firstParam = false;\n } else {\n urlArr.push(\"&\");\n }\n urlArr.push(key);\n urlArr.push(\"=\");\n urlArr.push(getParams[key as keyof typeof getParams]);\n }\n }\n\n var completeUrl = urlArr.join(\"\");\n\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", completeUrl, true);\n\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.setRequestHeader(\n \"X-PlayFabSDK\",\n \"JavaScriptSDK-\" + constants.sdkVersion\n );\n if (authkey != null) {\n xhr.setRequestHeader(authkey, authValue!);\n }\n this.InjectHeaders(xhr, this.settings.GlobalHeaderInjection);\n this.InjectHeaders(xhr, extraHeaders);\n\n xhr.onloadend = () => {\n var result = this.GetPlayFabResponse(body, xhr, startTime, customData);\n if (result.code === 200) {\n resolve(result.data || result);\n } else {\n reject(result);\n }\n };\n\n xhr.onerror = () => {\n var result = this.GetPlayFabResponse(body, xhr, startTime, customData);\n reject(result);\n };\n\n xhr.send(requestBody);\n });\n }\n\n GetPlayFabResponse(\n request: any,\n xhr: XMLHttpRequest,\n startTime: number,\n customData: any\n ) {\n var result = null as any;\n try {\n // window.console.log(\"parsing json result: \" + xhr.responseText);\n result = JSON.parse(xhr.responseText);\n } catch (e) {\n result = {\n code: 503, // Service Unavailable\n status: \"Service Unavailable\",\n error: \"Connection error\",\n errorCode: 2, // PlayFabErrorCode.ConnectionError\n errorMessage: xhr.responseText,\n };\n }\n\n result.CallBackTimeMS = new Date().getTime() - startTime;\n result.Request = request;\n result.CustomData = customData;\n return result;\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 ExecuteRequestWrapper<T extends IPlayFabResultCommon>(\n apiURL: string,\n request: any,\n authKey: string | null,\n customData: any,\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 this.ExecuteRequest<T>(\n this.GetServerUrl() + apiURL,\n request,\n authKey,\n authValue,\n customData,\n extraHeaders\n );\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,cAAc;AAAA,EACzB,iBAAiB;AAAA,IACf,UAAU;AAAA,IACV,WAAW;AAAA,EACb;AAAA,EACA,m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AAqB,SAAqC,YAAkB,cAAuC;AAC/G,WAAO,KAAK,sBAAmD,gCAAgC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EACrJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWA,uBAAwB,SAAwC,YAAkB,cAAuC;AACrH,WAAO,KAAK,sBAAsD,qCAAqC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EAC7J;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,oBAAqB,SAAqC,YAAkB,cAAuC;AAC/G,WAAO,KAAK,sBAAmD,gCAAgC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EACrJ;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,gBAAiB,SAAiC,YAAkB,cAAuC;AACvG,WAAO,KAAK,sBAA+C,4BAA4B,SAAS,iBAAiB,YAAY,YAAY;AAAA,EAC7I;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,qBAAsB,SAAsC,YAAkB,cAAuC;AACjH,WAAO,KAAK,sBAAoD,mCAAmC,SAAS,iBAAiB,YAAY,YAAY;AAAA,EACzJ;AAEJ;","names":[]}
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,4 +1,4 @@
1
- import { I as IPlayFabRequestCommon, a as IPlayFabResultCommon, P as PlayFabCommon } from './PlayFabCommon-BUv4zqXf.mjs';
1
+ import { I as IPlayFabRequestCommon, a as IPlayFabResultCommon, P as PlayFabCommon } from './PlayFabCommon-Dnp_xHg5.js';
2
2
 
3
3
  interface CreateTelemetryKeyRequest extends IPlayFabRequestCommon {
4
4
  /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
@@ -76,6 +76,16 @@ interface DeleteDataConnectionResponse extends IPlayFabResultCommon {
76
76
  /** Indicates whether or not the connection was deleted as part of the request. */
77
77
  WasDeleted: boolean;
78
78
  }
79
+ interface DeleteEventSamplingRatioRequest extends IPlayFabRequestCommon {
80
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
81
+ CustomTags?: Record<string, string | null>;
82
+ /** Name of the sampled event */
83
+ EventName: string;
84
+ /** Namespace of the sampled event */
85
+ EventNamespace: string;
86
+ }
87
+ interface DeleteEventSamplingRatioResult extends IPlayFabResultCommon {
88
+ }
79
89
  interface DeleteTelemetryKeyRequest extends IPlayFabRequestCommon {
80
90
  /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
81
91
  CustomTags?: Record<string, string | null>;
@@ -93,6 +103,11 @@ interface EntityKey {
93
103
  Id: string;
94
104
  /** Entity type. See https://docs.microsoft.com/gaming/playfab/features/data/entities/available-built-in-entity-types */
95
105
  Type?: string;
106
+ /**
107
+ * Alternate name for Type.
108
+ * @deprecated Please use Type instead.
109
+ */
110
+ TypeString?: string;
96
111
  }
97
112
  interface EventContents {
98
113
  /**
@@ -125,6 +140,11 @@ interface EventContents {
125
140
  */
126
141
  PayloadJSON?: string;
127
142
  }
143
+ interface EventSamplingRatio {
144
+ EventName?: string;
145
+ EventNamespace?: string;
146
+ Ratio: number;
147
+ }
128
148
  interface GetDataConnectionRequest extends IPlayFabRequestCommon {
129
149
  /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
130
150
  CustomTags?: Record<string, string | null>;
@@ -135,6 +155,29 @@ interface GetDataConnectionResponse extends IPlayFabResultCommon {
135
155
  /** The details of the queried Data Connection. */
136
156
  DataConnection?: DataConnectionDetails;
137
157
  }
158
+ interface GetEventSamplingRatioRequest extends IPlayFabRequestCommon {
159
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
160
+ CustomTags?: Record<string, string | null>;
161
+ /** Name of the sampled event */
162
+ EventName: string;
163
+ /** Namespace of the sampled event */
164
+ EventNamespace: string;
165
+ }
166
+ interface GetEventSamplingRatioResult extends IPlayFabResultCommon {
167
+ /** Name of the sampled event */
168
+ EventName: string;
169
+ /** Namespace of the sampled event */
170
+ EventNamespace: string;
171
+ /** Sampling ratio of the event */
172
+ Ratio: number;
173
+ }
174
+ interface GetEventSamplingRatiosRequest extends IPlayFabRequestCommon {
175
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
176
+ CustomTags?: Record<string, string | null>;
177
+ }
178
+ interface GetEventSamplingRatiosResult extends IPlayFabResultCommon {
179
+ Ratios?: EventSamplingRatio[];
180
+ }
138
181
  interface GetTelemetryKeyRequest extends IPlayFabRequestCommon {
139
182
  /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
140
183
  CustomTags?: Record<string, string | null>;
@@ -198,6 +241,18 @@ interface SetDataConnectionResponse extends IPlayFabResultCommon {
198
241
  /** The details of the Data Connection to be created or updated. */
199
242
  DataConnection?: DataConnectionDetails;
200
243
  }
244
+ interface SetEventSamplingRatioRequest extends IPlayFabRequestCommon {
245
+ /** The optional custom tags associated with the request (e.g. build number, external trace identifiers, etc.). */
246
+ CustomTags?: Record<string, string | null>;
247
+ /** Name of the sampled event */
248
+ EventName: string;
249
+ /** Namespace of the sampled event */
250
+ EventNamespace: string;
251
+ /** Sampling ratio of the event */
252
+ Ratio: number;
253
+ }
254
+ interface SetEventSamplingRatioResult extends IPlayFabResultCommon {
255
+ }
201
256
  interface SetTelemetryKeyActiveRequest extends IPlayFabRequestCommon {
202
257
  /** Whether to set the key to active (true) or deactivated (false). */
203
258
  Active: boolean;
@@ -243,65 +298,197 @@ interface WriteEventsResponse extends IPlayFabResultCommon {
243
298
  declare class PlayFabEventsApi extends PlayFabCommon {
244
299
  /**
245
300
  * Creates a new telemetry key for the title.
246
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/createtelemetrykey
301
+ *
302
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/createtelemetrykey Microsoft Documentation}
303
+ * @example
304
+ * await eventClient.CreateTelemetryKey({
305
+ * "KeyName": "MyTelemetryKey"
306
+ * });
247
307
  */
248
- CreateTelemetryKey(request: CreateTelemetryKeyRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<CreateTelemetryKeyResponse>;
308
+ CreateTelemetryKey(request: CreateTelemetryKeyRequest, extraHeaders?: Record<string, string>): Promise<CreateTelemetryKeyResponse>;
249
309
  /**
250
310
  * Deletes a Data Connection from a title.
251
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/deletedataconnection
311
+ *
312
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/deletedataconnection Microsoft Documentation}
313
+ * @example
314
+ * await eventClient.DeleteDataConnection({
315
+ * "Name": "MyDataConnection"
316
+ * });
252
317
  */
253
- DeleteDataConnection(request: DeleteDataConnectionRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<DeleteDataConnectionResponse>;
318
+ DeleteDataConnection(request: DeleteDataConnectionRequest, extraHeaders?: Record<string, string>): Promise<DeleteDataConnectionResponse>;
319
+ /**
320
+ * Deletes the sampling ratio for an event.
321
+ *
322
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream/deleteeventsamplingratio Microsoft Documentation}
323
+ */
324
+ DeleteEventSamplingRatio(request: DeleteEventSamplingRatioRequest, extraHeaders?: Record<string, string>): Promise<DeleteEventSamplingRatioResult>;
254
325
  /**
255
326
  * Deletes a telemetry key configured for the title.
256
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/deletetelemetrykey
327
+ *
328
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/deletetelemetrykey Microsoft Documentation}
329
+ * @example
330
+ * await eventClient.DeleteTelemetryKey({
331
+ * "KeyName": "MyTelemetryKey"
332
+ * });
257
333
  */
258
- DeleteTelemetryKey(request: DeleteTelemetryKeyRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<DeleteTelemetryKeyResponse>;
334
+ DeleteTelemetryKey(request: DeleteTelemetryKeyRequest, extraHeaders?: Record<string, string>): Promise<DeleteTelemetryKeyResponse>;
259
335
  /**
260
336
  * Retrieves a single Data Connection associated with a title.
261
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/getdataconnection
337
+ *
338
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/getdataconnection Microsoft Documentation}
339
+ * @example
340
+ * await eventClient.GetDataConnection({
341
+ * "Name": "MyDataConnection"
342
+ * });
343
+ */
344
+ GetDataConnection(request: GetDataConnectionRequest, extraHeaders?: Record<string, string>): Promise<GetDataConnectionResponse>;
345
+ /**
346
+ * Gets the sampling ratio for an event.
347
+ *
348
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream/geteventsamplingratio Microsoft Documentation}
349
+ * @example
350
+ * await eventClient.GetEventSamplingRatio({
351
+ * "EventNamespace": "com.playfab",
352
+ * "EventName": "player_executed_cloudscript"
353
+ * });
262
354
  */
263
- GetDataConnection(request: GetDataConnectionRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetDataConnectionResponse>;
355
+ GetEventSamplingRatio(request: GetEventSamplingRatioRequest, extraHeaders?: Record<string, string>): Promise<GetEventSamplingRatioResult>;
356
+ /**
357
+ * Gets the event sampling ratios for a title.
358
+ *
359
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream/geteventsamplingratios Microsoft Documentation}
360
+ */
361
+ GetEventSamplingRatios(request: GetEventSamplingRatiosRequest, extraHeaders?: Record<string, string>): Promise<GetEventSamplingRatiosResult>;
264
362
  /**
265
363
  * Gets information about a telemetry key configured for the title.
266
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/gettelemetrykey
364
+ *
365
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/gettelemetrykey Microsoft Documentation}
366
+ * @example
367
+ * await eventClient.GetTelemetryKey({
368
+ * "KeyName": "MyTelemetryKey"
369
+ * });
267
370
  */
268
- GetTelemetryKey(request: GetTelemetryKeyRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<GetTelemetryKeyResponse>;
371
+ GetTelemetryKey(request: GetTelemetryKeyRequest, extraHeaders?: Record<string, string>): Promise<GetTelemetryKeyResponse>;
269
372
  /**
270
373
  * Retrieves the list of Data Connections associated with a title.
271
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/listdataconnections
374
+ *
375
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/listdataconnections Microsoft Documentation}
376
+ * @example
377
+ * await eventClient.ListDataConnections({});
272
378
  */
273
- ListDataConnections(request: ListDataConnectionsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListDataConnectionsResponse>;
379
+ ListDataConnections(request: ListDataConnectionsRequest, extraHeaders?: Record<string, string>): Promise<ListDataConnectionsResponse>;
274
380
  /**
275
381
  * Lists all telemetry keys configured for the title.
276
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/listtelemetrykeys
382
+ *
383
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/listtelemetrykeys Microsoft Documentation}
384
+ * @example
385
+ * await eventClient.ListTelemetryKeys({});
277
386
  */
278
- ListTelemetryKeys(request: ListTelemetryKeysRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<ListTelemetryKeysResponse>;
387
+ ListTelemetryKeys(request: ListTelemetryKeysRequest, extraHeaders?: Record<string, string>): Promise<ListTelemetryKeysResponse>;
279
388
  /**
280
389
  * Creates or updates a Data Connection on a title.
281
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/setdataconnection
390
+ *
391
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/setdataconnection Microsoft Documentation}
392
+ * @example
393
+ * await eventClient.SetDataConnection({
394
+ * "Name": "MyDataConnection",
395
+ * "Type": "AzureDataExplorer",
396
+ * "IsActive": true,
397
+ * "ConnectionSettings": {
398
+ * "AzureDataExplorerSettings": {
399
+ * "ClusterUri": "https://myadxcluster.kusto.windows.net",
400
+ * "Database": "MyDatabase",
401
+ * "Table": "MyTable"
402
+ * }
403
+ * }
404
+ * });
282
405
  */
283
- SetDataConnection(request: SetDataConnectionRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<SetDataConnectionResponse>;
406
+ SetDataConnection(request: SetDataConnectionRequest, extraHeaders?: Record<string, string>): Promise<SetDataConnectionResponse>;
284
407
  /**
285
408
  * Sets a Data Connection for the title to either the active or deactivated state.
286
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/setdataconnectionactive
409
+ *
410
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/setdataconnectionactive Microsoft Documentation}
411
+ * @example
412
+ * await eventClient.SetDataConnectionActive({
413
+ * "Name": "MyDataConnection",
414
+ * "Active": false
415
+ * });
416
+ */
417
+ SetDataConnectionActive(request: SetDataConnectionActiveRequest, extraHeaders?: Record<string, string>): Promise<SetDataConnectionActiveResponse>;
418
+ /**
419
+ * Sets the sampling ratio for an event.
420
+ *
421
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream/seteventsamplingratio Microsoft Documentation}
287
422
  */
288
- SetDataConnectionActive(request: SetDataConnectionActiveRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<SetDataConnectionActiveResponse>;
423
+ SetEventSamplingRatio(request: SetEventSamplingRatioRequest, extraHeaders?: Record<string, string>): Promise<SetEventSamplingRatioResult>;
289
424
  /**
290
425
  * Sets a telemetry key to the active or deactivated state.
291
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/settelemetrykeyactive
426
+ *
427
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/settelemetrykeyactive Microsoft Documentation}
428
+ * @example
429
+ * await eventClient.SetTelemetryKeyActive({
430
+ * "KeyName": "MyTelemetryKey",
431
+ * "Active": false
432
+ * });
292
433
  */
293
- SetTelemetryKeyActive(request: SetTelemetryKeyActiveRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<SetTelemetryKeyActiveResponse>;
434
+ SetTelemetryKeyActive(request: SetTelemetryKeyActiveRequest, extraHeaders?: Record<string, string>): Promise<SetTelemetryKeyActiveResponse>;
294
435
  /**
295
436
  * Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'.
296
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/writeevents
437
+ *
438
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/writeevents Microsoft Documentation}
439
+ * @example
440
+ * await eventClient.WriteEvents({
441
+ * "Events": [
442
+ * {
443
+ * "Entity": {
444
+ * "Id": "A8140AB9109712B",
445
+ * "Type": "title",
446
+ * "TypeString": "title"
447
+ * },
448
+ * "EventNamespace": "com.playfab.events.example",
449
+ * "Name": "something_happened",
450
+ * "Payload": {
451
+ * "Foo": "Bar",
452
+ * "Nums": [
453
+ * 1,
454
+ * 2,
455
+ * 3
456
+ * ]
457
+ * }
458
+ * }
459
+ * ]
460
+ * });
297
461
  */
298
- WriteEvents(request: WriteEventsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<WriteEventsResponse>;
462
+ WriteEvents(request: WriteEventsRequest, extraHeaders?: Record<string, string>): Promise<WriteEventsResponse>;
299
463
  /**
300
464
  * Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start
301
465
  * with 'custom.'
302
- * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/writetelemetryevents
466
+ *
467
+ * {@link https://docs.microsoft.com/rest/api/playfab/event/playstream-events/writetelemetryevents Microsoft Documentation}
468
+ * @example
469
+ * await eventClient.WriteTelemetryEvents({
470
+ * "Events": [
471
+ * {
472
+ * "Entity": {
473
+ * "Id": "A8140AB9109712B",
474
+ * "Type": "title",
475
+ * "TypeString": "title"
476
+ * },
477
+ * "EventNamespace": "com.playfab.events.example",
478
+ * "Name": "something_happened",
479
+ * "Payload": {
480
+ * "Foo": "Bar",
481
+ * "Nums": [
482
+ * 1,
483
+ * 2,
484
+ * 3
485
+ * ]
486
+ * }
487
+ * }
488
+ * ]
489
+ * });
303
490
  */
304
- WriteTelemetryEvents(request: WriteEventsRequest, customData?: any, extraHeaders?: Record<string, string>): Promise<WriteEventsResponse>;
491
+ WriteTelemetryEvents(request: WriteEventsRequest, extraHeaders?: Record<string, string>): Promise<WriteEventsResponse>;
305
492
  }
306
493
 
307
494
  export { PlayFabEventsApi as default };
package/dist/Events.js ADDED
@@ -0,0 +1,8 @@
1
+ import {
2
+ PlayFabEventsApi
3
+ } from "./chunk-GJBETVD4.js";
4
+ import "./chunk-B6REENP7.js";
5
+ export {
6
+ PlayFabEventsApi as default
7
+ };
8
+ //# sourceMappingURL=Events.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/apis/PlayFabEventsApi.ts","../src/constants.ts","../src/PlayFabContext.ts","../src/PlayFabCommon.ts"],"sourcesContent":["import type {\n\n CreateTelemetryKeyRequest,\n DeleteDataConnectionRequest,\n DeleteTelemetryKeyRequest,\n GetDataConnectionRequest,\n GetTelemetryKeyRequest,\n ListDataConnectionsRequest,\n ListTelemetryKeysRequest,\n SetDataConnectionRequest,\n SetDataConnectionActiveRequest,\n SetTelemetryKeyActiveRequest,\n WriteEventsRequest,\n CreateTelemetryKeyResponse,\n DeleteDataConnectionResponse,\n DeleteTelemetryKeyResponse,\n GetDataConnectionResponse,\n GetTelemetryKeyResponse,\n ListDataConnectionsResponse,\n ListTelemetryKeysResponse,\n SetDataConnectionResponse,\n SetDataConnectionActiveResponse,\n SetTelemetryKeyActiveResponse,\n WriteEventsResponse,\n} from \"../types/PlayFabEventsApi\";\nimport { PlayFabCommon } from \"../PlayFabCommon\";\n\nexport default class PlayFabEventsApi extends PlayFabCommon {\n\n /**\n * Creates a new telemetry key for the title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/createtelemetrykey\n */\n CreateTelemetryKey (request: CreateTelemetryKeyRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<CreateTelemetryKeyResponse>(\"/Event/CreateTelemetryKey\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Deletes a Data Connection from a title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/deletedataconnection\n */\n DeleteDataConnection (request: DeleteDataConnectionRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<DeleteDataConnectionResponse>(\"/Event/DeleteDataConnection\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Deletes a telemetry key configured for the title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/deletetelemetrykey\n */\n DeleteTelemetryKey (request: DeleteTelemetryKeyRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<DeleteTelemetryKeyResponse>(\"/Event/DeleteTelemetryKey\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Retrieves a single Data Connection associated with a title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/getdataconnection\n */\n GetDataConnection (request: GetDataConnectionRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetDataConnectionResponse>(\"/Event/GetDataConnection\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Gets information about a telemetry key configured for the title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/gettelemetrykey\n */\n GetTelemetryKey (request: GetTelemetryKeyRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<GetTelemetryKeyResponse>(\"/Event/GetTelemetryKey\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Retrieves the list of Data Connections associated with a title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/listdataconnections\n */\n ListDataConnections (request: ListDataConnectionsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ListDataConnectionsResponse>(\"/Event/ListDataConnections\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Lists all telemetry keys configured for the title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/listtelemetrykeys\n */\n ListTelemetryKeys (request: ListTelemetryKeysRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<ListTelemetryKeysResponse>(\"/Event/ListTelemetryKeys\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Creates or updates a Data Connection on a title.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/setdataconnection\n */\n SetDataConnection (request: SetDataConnectionRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<SetDataConnectionResponse>(\"/Event/SetDataConnection\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Sets a Data Connection for the title to either the active or deactivated state.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/setdataconnectionactive\n */\n SetDataConnectionActive (request: SetDataConnectionActiveRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<SetDataConnectionActiveResponse>(\"/Event/SetDataConnectionActive\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Sets a telemetry key to the active or deactivated state.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/settelemetrykeyactive\n */\n SetTelemetryKeyActive (request: SetTelemetryKeyActiveRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<SetTelemetryKeyActiveResponse>(\"/Event/SetTelemetryKeyActive\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Write batches of entity based events to PlayStream. The namespace of the Event must be 'custom' or start with 'custom.'.\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/writeevents\n */\n WriteEvents (request: WriteEventsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<WriteEventsResponse>(\"/Event/WriteEvents\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n /**\n * Write batches of entity based events to as Telemetry events (bypass PlayStream). The namespace must be 'custom' or start\n * with 'custom.'\n * https://docs.microsoft.com/rest/api/playfab/events/playstream-events/writetelemetryevents\n */\n WriteTelemetryEvents (request: WriteEventsRequest, customData?: any, extraHeaders?: Record<string, string>) {\n return this.ExecuteRequestWrapper<WriteEventsResponse>(\"/Event/WriteTelemetryEvents\", request, \"X-EntityToken\", customData, extraHeaders);\n }\n\n};\n","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 GlobalHeaderInjection?: { [key: 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 AuthInfoMap = {\n \"X-EntityToken\": {\n authAttr: \"entityToken\",\n authError: \"errorEntityToken\",\n },\n \"X-Authorization\": {\n authAttr: \"sessionTicket\",\n authError: \"errorLoggedIn\",\n },\n \"X-SecretKey\": {\n authAttr: \"developerSecretKey\",\n authError: \"errorSecretKey\",\n },\n};\n\nexport default {\n sdkVersion: \"1.192.250526\",\n sdkFingerprint: \"JavaScriptSDK-1.192.250526\",\n buildIdentifier: \"custom_async-javascriptsdk\",\n defaultSettings: {\n titleId: \"\",\n developerSecretKey: \"\",\n GlobalHeaderInjection: {},\n productionServerUrl: \".playfabapi.com\",\n verticalName: null\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 } 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 = \"Must be have settings.titleId set to call this method\";\n errorLoggedIn = \"Must be logged in to call this method\";\n errorEntityToken =\n \"You must successfully call GetEntityToken before calling this\";\n errorSecretKey =\n \"Must have settings.developerSecretKey set to call this method\";\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 ExecuteRequest<T extends IPlayFabResultCommon>(\n url: string,\n body: any,\n authkey: string | null,\n authValue: string | null,\n customData: any,\n extraHeaders?: Record<string, string>\n ): Promise<T> {\n return new Promise((resolve, reject) => {\n if (body == null) body = {};\n\n var startTime = new Date().getTime();\n var requestBody = JSON.stringify(body);\n\n var urlArr = [url];\n var getParams = this.requestGetParams;\n if (getParams != null) {\n var firstParam = true;\n for (var key in getParams) {\n if (firstParam) {\n urlArr.push(\"?\");\n firstParam = false;\n } else {\n urlArr.push(\"&\");\n }\n urlArr.push(key);\n urlArr.push(\"=\");\n urlArr.push(getParams[key as keyof typeof getParams]);\n }\n }\n\n var completeUrl = urlArr.join(\"\");\n\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", completeUrl, true);\n\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n xhr.setRequestHeader(\n \"X-PlayFabSDK\",\n \"JavaScriptSDK-\" + constants.sdkVersion\n );\n if (authkey != null) {\n xhr.setRequestHeader(authkey, authValue!);\n }\n this.InjectHeaders(xhr, this.settings.GlobalHeaderInjection);\n this.InjectHeaders(xhr, extraHeaders);\n\n xhr.onloadend = () => {\n var result = this.GetPlayFabResponse(body, xhr, startTime, customData);\n if (result.code === 200) {\n resolve(result.data || result);\n } else {\n reject(result);\n }\n };\n\n xhr.onerror = () => {\n var result = this.GetPlayFabResponse(body, xhr, startTime, customData);\n reject(result);\n };\n\n xhr.send(requestBody);\n });\n }\n\n GetPlayFabResponse(\n request: any,\n xhr: XMLHttpRequest,\n startTime: number,\n customData: any\n ) {\n var result = null as any;\n try {\n // window.console.log(\"parsing json result: \" + xhr.responseText);\n result = JSON.parse(xhr.responseText);\n } catch (e) {\n result = {\n code: 503, // Service Unavailable\n status: \"Service Unavailable\",\n error: \"Connection error\",\n errorCode: 2, // PlayFabErrorCode.ConnectionError\n errorMessage: xhr.responseText,\n };\n }\n\n result.CallBackTimeMS = new Date().getTime() - startTime;\n result.Request = request;\n result.CustomData = customData;\n return result;\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 ExecuteRequestWrapper<T extends IPlayFabResultCommon>(\n apiURL: string,\n request: any,\n authKey: string | null,\n customData: any,\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 this.ExecuteRequest<T>(\n this.GetServerUrl() + apiURL,\n request,\n authKey,\n authValue,\n customData,\n extraHeaders\n );\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACWO,IAAM,cAAc;AAAA,EACzB,iBAAiB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